Breadcrumbs display the current page location within a navigational hierarchy. They help users understand where they are and navigate back to parent pages.
Basic Usage
Separator Styles
The separator prop controls the visual separator between breadcrumb items. The default is "slash".
With Custom Link Component
When using a routing library like Inertia.js, you can pass a custom link component to enable client-side navigation:
import { Link } from "core/link" <Breadcrumbs items={[ { label: "Dashboard", href: "/dashboard" }, { label: "Settings", href: "/settings" }, { label: "Profile" } ]} linkComponent={Link} />
Behavior
- The last item in the
itemsarray is automatically treated as the current page and rendered as non-clickable text witharia-current="page". - Items without an
hrefare rendered as plain text. - Items with an
hrefare rendered as clickable links with hover states. - The component uses proper semantic HTML with
<nav>and<ol>elements for accessibility.