Breadcrumbs
atroui/breadcrumbsFreeComponent
Path navigation trail for docs and product pages.
Install it
npx shadcn@latest add https://atroui.com/r/breadcrumbs.jsonSource
1import { ChevronRight } from "lucide-react"2import Link from "next/link"34import { cn } from "@/lib/utils"56export type BreadcrumbItem = {7 label: string8 href?: string9}1011export function Breadcrumbs({12 items,13 className,14}: {15 items: BreadcrumbItem[]16 className?: string17}) {18 return (19 <nav aria-label="Breadcrumb" className={cn("text-sm", className)}>20 <ol className="flex flex-wrap items-center gap-1.5">21 {items.map((item, i) => {22 const isLast = i === items.length - 123 return (24 <li key={item.label} className="flex items-center gap-1.5">25 {i > 0 ? (26 <ChevronRight27 className="size-3.5 text-muted-foreground/60"28 aria-hidden29 />30 ) : null}31 {isLast || !item.href ? (32 <span33 className="text-muted-foreground"34 aria-current={isLast ? "page" : undefined}35 >36 {item.label}37 </span>38 ) : (39 <Link40 href={item.href}41 className="text-muted-foreground hover:text-foreground"42 >43 {item.label}44 </Link>45 )}46 </li>47 )48 })}49 </ol>50 </nav>51 )52}
What it pulls in
npm packages
Other registry items
Files it writes
More from atroui
All 81 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Buttonbutton | atroui | Components | Free | 2 deps | |
| Cardcard | atroui | Components | Free | no deps | |
| Fade Infade-in | atroui | Components | Free | 1 dep | |
| Form Selectform-select | atroui | Components | Free | 2 deps | |
| Founder Avatarfounder-avatar | atroui | Components | Free | 1 dep | |
| Logologo | atroui | Components | Free | no deps | |
| Mockup Framemockup-frame | atroui | Components | Free | no deps | |
| Proseprose | atroui | Components | Free | no deps |
