Breadcrumb
<Breadcrumb>TailwindCSS ModulesBreadcrumbs show where a page sits within a hierarchy and provide a direct path back to its ancestors. Coloxo UI breadcrumbs combine lightweight links, chevron separators, flexible labels, and a clearly identified current page.
npx coloxo add breadcrumb --style coloxo-cssimport { Breadcrumb } from '@coloxo/ui';Design Tokens:
1. State Matrix
Ancestor links support hover and keyboard focus. The current page is rendered as text and marked for assistive technology.
| State | Preview | Behavior |
|---|---|---|
| Default | Ancestor links use the tertiary text color. | |
| Hover | Brand text and an underline highlight links. | |
| Focus | A visible ring identifies keyboard focus. | |
| Current page | The final item is current by default and is not a link. |
2. Hierarchy
Start with the broadest destination and end with the current page. Items without an href render as text.
Standard trail
Nested hierarchy
3. Icons & Labels
Labels accept React nodes. Pair decorative icons with visible text so destinations remain easy to understand.
Leading home icon
4. Interactive Props Configurator
<Breadcrumb items={[ { label: "Home", href: "/" }, { label: "Components", href: "/components" }, { label: "Breadcrumb" }, ]}/>5. Dark theme
Semantic tokens adapt ancestor links, separators, current-page text, and focus rings to dark surfaces.
Standard trailKeyboard focus6. Enterprise layout compositions
Place a breadcrumb above the page heading to establish context before showing actions or detailed content.
Workspace members
Manage the people who have access to your workspace.
Project assets
Shared files and resources for your next release.
Brand assets
Product images
Accessibility
A nav landmark labeled "Breadcrumb" contains an ordered list that preserves the hierarchy for screen readers.
The current item uses aria-current="page" and renders as text. Chevron separators are hidden from assistive technology.
Tab moves through ancestor links and Enter follows the focused link. Each link has a visible keyboard focus ring.
Props
| Name | Type | Default | Description |
|---|---|---|---|
| items | BreadcrumbItem[] | — | Ordered list of ancestor destinations and the current page. |
| className | string | — | Additional CSS class applied to the navigation element. |
BreadcrumbItem
| Name | Type | Default | Description |
|---|---|---|---|
| label | ReactNode | — | Visible destination label, including optional icons. |
| href | string | — | Link destination. Items without a destination render as text. |
| current | boolean | true for the last item | Marks the current page and renders its label as text, even when href is provided. |