Anex UI logoAnex UI
npm install anexui
Documentation

Documentation

Breadcrumb

A navigation trail with <nav aria-label="Breadcrumb"> and aria-current="page" on the last item.

Preview

Usage

import { Breadcrumb } from "anexui";

<Breadcrumb
  items={[
    { label: "Home", href: "/" },
    { label: "Docs", href: "/docs" },
    { label: "Button" },
  ]}
/>
Copy code

Custom separator

<Breadcrumb
  separator="›"
  items={[
    { label: "Home", href: "/" },
    { label: "Components", href: "/docs/components" },
    { label: "Breadcrumb" },
  ]}
/>
Copy code

SPA navigation (onClick)

<Breadcrumb
  items={[
    { label: "Home", onClick: () => router.push("/") },
    { label: "Settings", onClick: () => router.push("/settings") },
    { label: "Profile" },
  ]}
/>
Copy code

| Field | Type | Description | |---|---|---| | label | string | Required. Visible text | | href | string | Renders as an <a> link | | onClick | MouseEventHandler | SPA navigation handler |

| Prop | Type | Default | Description | |---|---|---|---| | items | BreadcrumbItem[] | — | Required. Ordered list of crumbs | | separator | ReactNode | "/" | Character or node between items |

All standard HTML <nav> attributes are accepted.

Accessibility