Breadcrumb
Updated
Breadcrumb is a trail of links in pixel caps, split by pixel-font slashes, ending at the current page with aria-current. On screens narrower than 480px, the crumbs between the first and the last two fold into a … button that unfolds them; resize the window to see it. Like the charts, it takes your theme's ink and paper, light or dark, and needs no Tailwind.
Example
import "@/components/dithercharts/controls.css"
import { Breadcrumb } from "@/components/dithercharts/breadcrumb"
// The last item is the current page; a crumb without href is plain text.
<Breadcrumb
items={[
{ label: "Home", href: "/" },
{ label: "Docs", href: "/docs" },
{ label: "Controls", href: "/docs/controls" },
{ label: "Navigation" },
{ label: "Breadcrumb" },
]}
/>Install
Controls install with DitherCharts Pro. See Installation to log in, then import controls.css once, e.g. in your root layout.
npx dithercharts add breadcrumb
Props
It renders a native element, so every other attribute that element takes passes through.
| Prop | Type | Default | Description |
|---|---|---|---|
| itemsrequired | Type BreadcrumbItem[] | Default – | The trail from the top level down to the current page, which is the last item. |
| label | Type string | Default "Breadcrumb" | Names the nav for screen readers. |

