Weftv0.4.0
GitHubFigma
Blade AI
Navigation · Breadcrumbstable

Breadcrumb

Shows where the current page sits in the product, such as Home, Payments, Settlements, Settlement #4521, and lets people go back to any level. Long trails collapse into an expandable ellipsis.

Preview

#preview

Change the options and the code follows. Show code opens the React snippet.

breadcrumb-example.tsx
import { Breadcrumb } from "@blade-ai/weft/components/breadcrumb";

<Breadcrumb
  items={[
    { label: "Home", href: "/" },
    { label: "Payments", href: "/payments" },
    { label: "Settlements", href: "/payments/settlements" },
    { label: "Settlement #4521" },
  ]}
/>

All states

#all-states

Trail, item states, current page and truncated, from the Breadcrumb artboard.

Breadcrumb · 7 states
Trail
Hover
Focus
Pressed
Disabled item
Current
Truncated

Props

#props

Read from the component source. Booleans are is-prefixed. A star marks a required prop.

Breadcrumb
Prop
Type
Default
Description
items *
BreadcrumbItemData[]
—
Trail from the root to the current page. The last item is the current page.
maxItems
number
—
Collapse the middle of long trails into an expandable "…" once there are more items than this. Minimum 2.
accessibilityLabel
string
"Breadcrumb"
Accessible name of the navigation landmark.
expandLabel
string
"Show hidden pages"
Accessible name of the "…" button.
BreadcrumbItemData
Prop
Type
Default
Description
label *
string
—
—
href
string
—
Renders a link. Omit for the current page, or pair with onClick for client routing.
onClick
(event: MouseEvent<HTMLElement>) => void
—
—
isDisabled
boolean
—
—

Usage

#usage

Short rules for choosing and writing breadcrumb.

Do
List the parent pages from the top level down.
Place it above the page title on pages two or more levels deep.
Keep labels short and match the page titles.
Don't
List pages in the order they were visited; use Back for that.
Show a breadcrumb on top-level pages.
Link the current page.

Accessibility

#accessibility

A nav landmark with an ordered list. The last item is the current page and is not a link.

Keyboard
Key
Action
Tab / Shift+Tab
Moves between links and the ellipsis button.
Enter / Space
Follows the link or expands the trail.
ARIA
Element
Role / attribute
When
Breadcrumb
nav · aria-label = accessibilityLabel
Defaults to "Breadcrumb".
Current page
aria-current="page"
Last item.
Separators
aria-hidden="true"
Decorative.
Ellipsis
button · aria-label = expandLabel
When maxItems collapses the trail.