Skip to content
Kappa
Breadcrumbs
@dicehub/kappav0.4.2

Breadcrumbs

Shows the current resource inside an ordered hierarchy of ancestor links.

Installation

Barrel

import {
  Breadcrumbs,
  BreadcrumbsCurrent,
} from "@dicehub/kappa";

Granular

import {
  Breadcrumbs,
  BreadcrumbsCurrent,
  BreadcrumbsEllipsis,
  BreadcrumbsItem,
  BreadcrumbsLink,
  BreadcrumbsList,
  BreadcrumbsPage,
  BreadcrumbsRoot,
  BreadcrumbsSeparator,
} from "@dicehub/kappa/components/breadcrumbs";

Usage

Root renders a labelled navigation landmark, List preserves hierarchy as an ordered list, and Current is an alias of the noninteractive Page part.

Composition

Typical part hierarchy
Breadcrumbs.Root
└── Breadcrumbs.List
    ├── Breadcrumbs.Item
    │   └── Breadcrumbs.Link
    ├── Breadcrumbs.Separator
    ├── Breadcrumbs.Ellipsis
    └── Breadcrumbs.Item
        └── Breadcrumbs.Page / Breadcrumbs.Current

Root creates the navigation landmark. List and Item preserve the ordered hierarchy. Alternate linked ancestors with decorative separators, then end with Page or its Current alias for the active location.

Examples

Basic

Link each ancestor and render the current page as the final, noninteractive item.

Custom Separator

Replace the default direction-aware chevron through Separator's default slot.

Sizes

Use sm in dense toolbars and base for standard page context.

With Icons

Place decorative SVG beside visible labels. Do not replace every label with an icon.

Long and Wrapping

Trails wrap without horizontal overflow. Preserve the full current location; collapse known ancestors when the surrounding layout requires a shorter trail.

Collapsed

Ellipsis is a decorative indicator only. It does not measure, hide, or automatically collapse items; application code chooses which known ancestors to omit.

Collapsed Ancestor Menu

Compose the indicator inside a labelled Ark Menu trigger when omitted ancestors must remain navigable. Render menu destinations as the menu items themselves.

Use asChild so Link styles and attributes merge onto a router's semantic anchor.

Right-to-left

Logical flow reverses the trail and the default directional separator.

Accessibility

  • Give each trail a concise aria-label or aria-labelledby; Root defaults to “Breadcrumb”.
  • Keep ancestor destinations as links and the final Page or Current as a noninteractive span with aria-current="page".
  • Separators and Ellipsis are decorative and hidden from assistive technology.
  • Breadcrumbs add no arrow-key model. Native links use the normal Tab order and Enter activation.
  • A collapsed ancestor trigger needs an accessible name and a real Menu with managed focus, Escape, and outside-dismiss behavior.
  • Keep a visible focus indicator and do not depend on separator shape or color to communicate hierarchy.

See the WAI-ARIA Breadcrumb Patternand Ark UI Menu guidance.

API Reference

Root

Forwards native navigation attributes, listeners, ARIA properties, and data attributes.

PropTypeDefaultDescription
size"sm" | "base""base"Trail density.

Forwards native anchor attributes and listeners. Use href for a native anchor or asChild with a router component that renders one anchor.

PropTypeDefaultDescription
hrefstring—Native destination. Required when Link renders its own anchor.
asChildbooleanfalseMerges Link attributes and styling onto one child anchor, such as RouterLink.

Parts

PartElementDescription
RootnavLabelled navigation landmark; forwards native nav attributes.
ListolOrdered hierarchy of breadcrumb items.
ItemliWraps one link, current page, ellipsis, or composed control.
LinkaAncestor link; supports asChild for router-link composition.
Page / CurrentspanNoninteractive current location with aria-current=page.
SeparatorliDecorative, assistive-technology-hidden separator with a replaceable default slot.
EllipsisspanDecorative collapsed-state indicator; it does not hide items by itself.

Exports

ExportDescription
BreadcrumbsCompound root with Root, List, Item, Link, Page, Current, Separator, and Ellipsis.
BreadcrumbsRootUnaugmented root component.
BreadcrumbsListOrdered-list part.
BreadcrumbsItemList-item part.
BreadcrumbsLinkAncestor-link part.
BreadcrumbsPageCurrent-page part.
BreadcrumbsCurrentAlias of BreadcrumbsPage.
BreadcrumbsSeparatorDecorative separator part.
BreadcrumbsEllipsisDecorative ellipsis part.
BREADCRUMBS_SIZESSupported root-size values.
BREADCRUMBS_DEFAULT_SIZEDefault root size.
isBreadcrumbsSize / resolveBreadcrumbsSizeRuntime size guard and resolver.
Breadcrumbs*Props / Breadcrumbs*SlotsPublic root and part TypeScript contracts.