Breadcrumb

Trail of links that shows where the current page sits, with separators and a collapsed ellipsis.

Installation

pnpm dlx shadcn@latest add @ward/breadcrumb

Add the Ward registry to components.json once:

"registries": {
  "@ward": "https://ward.so/r/{name}.json"
}

Or install from the URL with no configuration: npx shadcn@latest add https://ward.so/r/breadcrumb.json

Usage

import { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator } from "@/components/ui/breadcrumb";
<Breadcrumb>
  <BreadcrumbList>
    <BreadcrumbItem><BreadcrumbLink href="/">Home</BreadcrumbLink></BreadcrumbItem>
    <BreadcrumbSeparator />
    <BreadcrumbItem><BreadcrumbEllipsis /></BreadcrumbItem>
    <BreadcrumbSeparator />
    <BreadcrumbItem><BreadcrumbLink href="/ui">WardUI</BreadcrumbLink></BreadcrumbItem>
    <BreadcrumbSeparator />
    <BreadcrumbItem><BreadcrumbPage>Card</BreadcrumbPage></BreadcrumbItem>
  </BreadcrumbList>
</Breadcrumb>

Props

PropTypeDefaultDescription
BreadcrumbLink hrefstring-Where the crumb goes.
BreadcrumbLink asChildbooleanfalseRender the child element (for example a framework link) with the crumb styles.
BreadcrumbPage childrenReactNode-Name of the current page; it is not a link and is marked as the current page for assistive technology.
BreadcrumbSeparator childrenReactNode-Custom separator, such as a slash; a chevron is drawn when it is empty.

Ward · Version 1.0.0 · Registry manifest