Skip to content
Nana UI

Breadcrumb

View .md Download

A navigation trail showing the user’s location in a hierarchy. Compose it from nana-breadcrumb-item children; the last item is usually current. One element covers the common professional patterns through orthogonal attributes: - Standard / Chevron / Pathseparator (slash · chevron · arrow · dot, or any custom glyph) and variant="path". - Pill · Card · Stepvariant. - Truncated / Dropdownmax-items collapses the middle into a , either inline (collapse="expand") or into a menu (collapse="dropdown"). - Mobile compact / back-navresponsive collapses to ← Parent below compact-width. - Underlinedunderline emphasises the current page (composes with any variant).

Home Components Breadcrumb
Terminal window
npm install @nana-tec/ui-components
import "@nana-tec/ui-components/breadcrumb";
<nana-breadcrumb>
<nana-breadcrumb-item href="#">Home</nana-breadcrumb-item>
<nana-breadcrumb-item href="#">Components</nana-breadcrumb-item>
<nana-breadcrumb-item>Breadcrumb</nana-breadcrumb-item>
</nana-breadcrumb>

current marks the active page; disabled dims a crumb.

Home Restricted Current

The variant attribute restyles the trail — default, path, pill, card, or step.

Home Library Data Cart Shipping Payment Home Docs Guide

Properties

PropertyAttributeTypeDefaultDescription
ariaLabelaria-labelstring | null'Breadcrumb'Accessible label for the landmark (maps to `aria-label`)
collapseBreadcrumbCollapse'expand'How a collapsed trail reveals hidden items
compactWidthcompact-widthnumber420Container width (px) below which `responsive` switches to the compact form
maxItemsmax-itemsnumber | undefinedCollapse the middle of the trail once there are more than this many items
responsivebooleanfalseCollapse to a single `← Parent` link below `compact-width`
separatorstring | undefinedSeparator glyph: a preset name (`slash`/`chevron`/`arrow`/`dot`) or any string
sizeBreadcrumbSize'md'Size applied to every item so the whole trail stays consistent
underlinebooleanfalseUnderline the current page (composes with any variant)
variantBreadcrumbVariant'default'Visual style of the trail

Events

EventDescription
nana-expandFired when a truncated trail is expanded inline

Slots

SlotDescription
(default)One or more `nana-breadcrumb-item` elements

CSS parts

PartDescription
::part(base)The `<nav>` landmark
::part(list)The `<ol>` that lays the items out
::part(menu)The overflow dropdown menu

CSS custom properties

PropertyDescription
--nana-breadcrumb-separatorSeparator glyph between items
--nana-breadcrumb-gapSpace around each separator
EventTypeDescription
nana-expandCustomEventFired when a truncated trail is expanded inline
SlotDescription
(default)One or more nana-breadcrumb-item elements
VariableDefaultDescription
--nana-breadcrumb-separatorSeparator glyph between items
--nana-breadcrumb-gapSpace around each separator
PartDescription
baseThe <nav> landmark
listThe <ol> that lays out the items
menuThe overflow dropdown menu
  • Keyboard accessible
  • Screen-reader labels
  • Focus-visible states
  • ARIA roles and states
  • WCAG 2.2 AA contrast
Explore Breadcrumb interactively Every state, prop, and edge case — with live controls — in Storybook.
View in Storybook