Components
Breadcrumb
The path to the current page, with each parent linked.
pnpm dlx shadcn@latest add @caliper/breadcrumbWhen to use
Use it for
- Hierarchies more than two levels deep.
- Pages reached from several routes.
Skip it when
- Flat sites; the page title is enough.
Installation
pnpm dlx shadcn@latest add @caliper/breadcrumb
Adds its 2 files to components/ui/, each with its own stylesheet, and installs their packages. No account needed. The first part also adds Caliper UI’s tokens; import them once as in Installation.
Usage
This is the code behind the preview above. It is built from Breadcrumb, BreadcrumbList, BreadcrumbItem, BreadcrumbLink, BreadcrumbPage and BreadcrumbSeparator.
import { Breadcrumb, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator } from "@/components/ui/breadcrumb" export function PagePath() { return ( <section className="grid w-full max-w-md gap-3 rounded-overlay border border-border bg-background p-6 shadow-resting"> <Breadcrumb> <BreadcrumbList> <BreadcrumbItem><BreadcrumbLink href="#">Projects</BreadcrumbLink></BreadcrumbItem> <BreadcrumbSeparator /> <BreadcrumbItem><BreadcrumbLink href="#">Atlas platform</BreadcrumbLink></BreadcrumbItem> <BreadcrumbSeparator /> <BreadcrumbItem><BreadcrumbPage>Settings</BreadcrumbPage></BreadcrumbItem> </BreadcrumbList> </Breadcrumb> <div className="grid gap-1"> <p className="text-xl font-semibold tracking-tight">Settings</p> <p className="text-sm text-muted-foreground">General, members and billing for Atlas platform.</p> </div> </section> ); }
API reference
Breadcrumb
component
No props of its own; it accepts the native props of its root element.
BreadcrumbList
component
No props of its own; it accepts the native props of its root element.
BreadcrumbItem
component
No props of its own; it accepts the native props of its root element.
BreadcrumbLink
component
Also accepts the native props of its root element and a ref.
BreadcrumbPage
component
No props of its own; it accepts the native props of its root element.
BreadcrumbSeparator
component
No props of its own; it accepts the native props of its root element.
Accessibility
It exposes presentation semantics, with aria-label, aria-current and aria-hidden kept in step with state.
No custom key handling; Tab and the native activation keys do the work.
Motion
It declares no animation in its component source. Any transition comes from its stylesheet, which uses the duration tokens that collapse to instant under prefers-reduced-motion.