Breadcrumbs
FreeA simple breadcrumb trail with an aria-current page marker.
npx shadcn@latest add @ui-shrushank/breadcrumbsThe install writes a single file to components/ui/Breadcrumbs.tsx, which exports Breadcrumbs.
tsx
import { Breadcrumbs } from "@/components/ui/Breadcrumbs";tsx
<Breadcrumbs items={items} />The wayfinding trail baseline.
An aria-current="page" marker on the last crumb.
Every line below was read out of the file you are about to copy, so you can check each one against the source at the bottom of this page.
- Carries
aria-current,aria-label, so its state is exposed and not left to the visual treatment alone.
aria-current tells a screen reader which crumb is "you are here": visually obvious, otherwise invisible.
1 required, 0 optional.
| Prop | Type | Default |
|---|---|---|
itemsrequired | { label: string; href?: string }[] | none |
itemsrequired{ label: string; href?: string }[]
One file, no runtime package. Copy it, or install it with the command at the top of this page.
Breadcrumbs.tsx
TypeScript