Breadcrumb
octane/breadcrumbFreeComponent
octane publishes no description for this item.
Live preview
live · rendered by the registry
Rendered by octane on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://raw.githubusercontent.com/octanejs/octane/main/packages/shadcn/registry/breadcrumb.jsonSource
1// Base UI base breadcrumb — class strings from the maintainer-supplied radix source, verbatim.2// Six of the seven parts are plain host elements with no primitive underneath and no state3// attributes, so they carry across unchanged and there is no dialect to get wrong.4//5// `BreadcrumbLink` IS MISSING ITS ESCAPE HATCH, and unlike badge that costs something real: the6// `asChild` branch is how a router's Link gets plugged in, which is most of what this family is7// for. It is still left out, for the same reason:8//9// radix `asChild` swaps in `Slot`, a pure prop-merger10// React Aria routes through RAC's own `Link` primitive with a `render` prop11// Base UI has neither — no Slot, and no Link primitive12//13// Base UI's house convention is a `render` ELEMENT prop backed by `useRender`, and this base14// already relies on it where a real primitive offers it (see pagination). But breadcrumb has no15// primitive, so nothing here settles whether upstream's Base UI breadcrumb implements `render`16// itself, and an API shape is not something a later commit can quietly correct — adding it is17// additive, shipping the wrong spelling is breaking.18//19// Until then a router link still works, it just has to carry the classes itself:20//21// <BreadcrumbItem>22// <RouterLink className="transition-colors hover:text-foreground">Home</RouterLink>23// </BreadcrumbItem>24//25// which loses only the `data-slot="breadcrumb-link"` hook.26import { ChevronRightIcon, MoreHorizontalIcon } from '@octanejs/lucide';27import { type OctaneNode } from 'octane';2829import { cn } from '@/lib/utils';3031type Props = { className?: string } & Record<string, unknown>;3233export function Breadcrumb({ className, ...props }: Props) @{34 <nav aria-label="breadcrumb" data-slot="breadcrumb" className={cn(className)} {...props} />35}3637export function BreadcrumbList({ className, ...props }: Props) @{38 <ol39 data-slot="breadcrumb-list"40 className={cn(41 'flex flex-wrap items-center gap-1.5 text-sm wrap-break-word text-muted-foreground',42 className,43 )}44 {...props}45 />46}4748export function BreadcrumbItem({ className, ...props }: Props) @{49 <li50 data-slot="breadcrumb-item"51 className={cn('inline-flex items-center gap-1', className)}52 {...props}53 />54}5556export interface BreadcrumbLinkProps extends Props {57 /**58 * NOT SUPPORTED in this base — see the header. Declared as `never` so markup carrying it over59// … truncated
What it pulls in
npm packages
Other registry items
Files it writes
More from octane
All 44 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Accordionaccordion | octane | Components | Free | 2 deps | |
| Alertalert | octane | Components | Free | 1 dep | |
| Alert Dialogalert-dialog | octane | Components | Free | 1 dep | |
| Aspect Ratioaspect-ratio | octane | Components | Free | no deps | |
| Avataravatar | octane | Components | Free | 1 dep | |
| Badgebadge | octane | Components | Free | 1 dep | |
| Buttonbutton | octane | Components | Free | 2 deps | |
| Cardcard | octane | Components | Free | no deps |
