Breadcrumb

A React breadcrumb navigation with aria-current on the last page, long trails that collapse behind a dots menu, icons, and custom separators.

Loading preview

Examples

Practical examples and common states for the same installable component.

Default

Simple links with slash separators and hover underline slide.

examples/breadcrumb-default.tsx
import { Breadcrumb, BreadcrumbItem } from "@/components/wensity/breadcrumb";
export function BreadcrumbDefault() {
return (
<Breadcrumb>
<BreadcrumbItem href="/">Home</BreadcrumbItem>
<BreadcrumbItem href="/components">Components</BreadcrumbItem>
<BreadcrumbItem isCurrentPage>Breadcrumb</BreadcrumbItem>
</Breadcrumb>
);
}

With Icons

Leading icons add context to each breadcrumb segment.

examples/breadcrumb-with-icons.tsx
import { IconHome, IconFolder, IconFile } from "@tabler/icons-react";
import { Breadcrumb, BreadcrumbItem } from "@/components/wensity/breadcrumb";
export function BreadcrumbWithIcons() {
return (
<Breadcrumb variant="with-icons">
<BreadcrumbItem href="/" icon={<IconHome />}>Home</BreadcrumbItem>
<BreadcrumbItem href="/docs" icon={<IconFolder />}>Documents</BreadcrumbItem>
<BreadcrumbItem isCurrentPage icon={<IconFile />}>report.pdf</BreadcrumbItem>
</Breadcrumb>
);
}

Collapsed

Long trails collapse to ellipsis, expanding inline on click with stagger animation.

examples/breadcrumb-collapsed.tsx
import { Breadcrumb, BreadcrumbItem } from "@/components/wensity/breadcrumb";
export function BreadcrumbCollapsed() {
return (
<Breadcrumb variant="collapsed" maxItems={3}>
<BreadcrumbItem href="/">Home</BreadcrumbItem>
<BreadcrumbItem href="/projects">Projects</BreadcrumbItem>
<BreadcrumbItem href="/wensity">Wensity</BreadcrumbItem>
<BreadcrumbItem href="/settings">Settings</BreadcrumbItem>
<BreadcrumbItem isCurrentPage>OAuth</BreadcrumbItem>
</Breadcrumb>
);
}

Dropdown

Collapsed items open in a floating dropdown menu.

examples/breadcrumb-dropdown.tsx
import { Breadcrumb, BreadcrumbItem } from "@/components/wensity/breadcrumb";
export function BreadcrumbDropdown() {
return (
<Breadcrumb variant="dropdown" maxItems={3}>
<BreadcrumbItem href="/">Home</BreadcrumbItem>
<BreadcrumbItem href="/projects">Projects</BreadcrumbItem>
<BreadcrumbItem href="/wensity">Wensity</BreadcrumbItem>
<BreadcrumbItem href="/settings">Settings</BreadcrumbItem>
<BreadcrumbItem isCurrentPage>API Keys</BreadcrumbItem>
</Breadcrumb>
);
}

Custom Separator

Use arrows, dots, or any ReactNode as the separator.

examples/breadcrumb-custom-separator.tsx
import { Breadcrumb, BreadcrumbItem } from "@/components/wensity/breadcrumb";
export function BreadcrumbCustomSeparator() {
return (
<Breadcrumb
variant="custom-separator"
separator={<span className="text-muted-foreground opacity-40 text-xs">→</span>}
>
<BreadcrumbItem href="/">Home</BreadcrumbItem>
<BreadcrumbItem href="/library">Library</BreadcrumbItem>
<BreadcrumbItem isCurrentPage>Components</BreadcrumbItem>
</Breadcrumb>
);
}

Overview

Breadcrumb is a React and Tailwind CSS breadcrumb navigation, in Next.js or any React app, that renders an ordered list inside a nav labeled breadcrumb, marks the last item aria-current, and hides separators from screen readers. Long trails collapse: maxItems keeps the first and last crumbs, and the hidden middle sits behind a dots button that either expands in place or opens a small menu. Items can carry icons, separators can be any node, and links get an underline that slides in on hover. Crumbs render plain anchor tags, so edit them to use next/link for client side routing.

Installation

Run the following command

~/your-project
pnpm dlx wensity@latest add breadcrumb

Usage

Import Breadcrumb from @/components/wensity/breadcrumb and render it anywhere in your React or Next.js app. The source lands in your own repo, so every prop, class and animation below is yours to edit.

app/example.tsx
import { Breadcrumb, BreadcrumbItem } from "@/components/wensity/breadcrumb";
export function BreadcrumbDemo() {
return (
<Breadcrumb>
<BreadcrumbItem href="/">Home</BreadcrumbItem>
<BreadcrumbItem href="/docs">Docs</BreadcrumbItem>
<BreadcrumbItem isCurrentPage>Breadcrumb</BreadcrumbItem>
</Breadcrumb>
);
}

Props

PropTypeDefaultDescription
variant"default" | "with-icons" | "collapsed" | "dropdown" | "custom-separator""default"Trail treatment. collapsed and dropdown fold the middle items away.
separatorReact.ReactNode-Node rendered between items.
maxItemsnumber3Visible items before the trail collapses, for the collapsed and dropdown variants.
  • Underline Animation component preview

    Underline Animation

    CSS hover underlines for links: slide, center, fill, wavy, and gradient.

  • Gooey Navigation Menu component preview

    Gooey Navigation Menu

    A liquid FAB whose child actions stretch out of the trigger like molten metal.

  • Gooey Dock component preview

    Gooey Dock

    A dock of icons in a solid pill. The active capsule stretches to the item you pick and flips its icon and label inside.

  • macOS Floating Dock component preview

    macOS Floating Dock

    A magnetic dock where icons inflate near the cursor and push their siblings aside.