Breadcrumbs

A trail that folds its middle into an ellipsis. Press it and the hidden crumbs spring out in order. Navigation.

Open playground

About

Breadcrumbs is a React component in the Navigation category of smoui. It is typed, ships no stylesheet, follows your theme through CSS variables, and honors prefers-reduced-motion. Import it with import { Breadcrumbs } from "@ashutoshswamy/smoui" and set items.

Install

Terminal
npm i @ashutoshswamy/smoui

Usage

TSX
import { Breadcrumbs } from "@ashutoshswamy/smoui";

<Breadcrumbs
  items={[
    { label: "Home", href: "/" },
    { label: "Components", href: "/components" },
    { label: "Navigation", href: "/components/navigation" },
    { label: "Breadcrumbs" },
  ]}
/>

Props 1

items

Trail, first to current. The last item is the current page. Folds when there are more than three.

{ label: string; href?: string }[]