Skip to content
Nana UI

Navigation

Breadcrumb Item

A single step in a nana-breadcrumb trail. Renders as a link when href is set, otherwise as plain text. Mark the final step with current so it is announced as the current page and rendered as non-interactive text. Item variants compose through attributes: - Icon / Icon-only — slot a nana-icon into prefix (add aria-label when there is no text). - Disabled / Loading — disabled, loading (skeleton placeholder). - Dropdown — dropdown turns the item into a menu trigger; put the menu entries in the menu slot. - Ellipsis — ellipsis renders a static ⋯. - Status / Badge — status (success·warning·error·info) and badge. The data-* attributes are driven by the parent nana-breadcrumb (variant, step index, collapse/compact state) — you normally don't set them by hand.

View .md Download
Home Current
npm install @nana-tec/ui-components
import "@nana-tec/ui-components/breadcrumb-item";
<nana-breadcrumb>
<nana-breadcrumb-item href="#">Home</nana-breadcrumb-item>
<nana-breadcrumb-item current>Current</nana-breadcrumb-item>
</nana-breadcrumb>

Properties

PropertyAttributeTypeDefaultDescription
backdata-backbooleanfalseCompact "back" affordance — prepends a ← and hides the separator
badgebadgestring | undefined—A small trailing badge (e.g. a count)
completedata-completebooleanfalseWhether this step precedes the current one (step variant)
currentcurrentbooleanfalseMarks this item as the current page — rendered as text with aria-current="page"
disableddisabledbooleanfalseDisables the link
dropdowndropdownbooleanfalseTurns the item into a dropdown trigger; menu entries go in the menu slot
ellipsisellipsisbooleanfalseRenders a static ⋯ (manual overflow indicator)
hrefhrefstring | undefined—Destination URL. When set (and not current), the item renders as a link.
isOverflowdata-overflowbooleanfalseRenders as the overflow trigger (a button) instead of a link/text
loadingloadingbooleanfalseShows a skeleton placeholder while route data loads
relrelstring | undefined—Relationship of the linked resource
sizesizeBreadcrumbSize | undefined—Size — set by the parent nana-breadcrumb to keep the trail consistent
statusstatusBreadcrumbItemStatus | undefined—Status accent shown as a leading dot + tinted text
stepdata-stepstring | undefined—Step number shown in the step variant marker
targettarget'_blank' | '_self' | '_parent' | '_top' | undefined—Where to open the link
variantdata-variantBreadcrumbVariant | undefined—Visual style, propagated from the parent breadcrumb

Events

EventDescription
nana-clickFired when an interactive item (link or overflow trigger) is activated
nana-toggleFired when a dropdown item opens or closes (detail.open)

Slots

SlotDescription
(default)The item label
prefixContent before the label (e.g. a leading nana-icon)
menuDropdown menu entries (shown when dropdown is open)

CSS parts

PartDescription
::part(separator)The glyph before the item
::part(marker)The step number marker (step variant)
::part(link)The <a>/<button> element (non-current items)
::part(label)The text wrapper (current items)
::part(badge)The trailing badge
::part(status)The status dot
::part(skeleton)The loading placeholder
::part(menu)The item dropdown menu
::part(trigger)The overflow trigger button (it also carries the link part)

CSS custom properties

PropertyDescription
--nana-breadcrumb-colorLink/label text colour
--nana-breadcrumb-color-hoverLink text colour on hover
--nana-breadcrumb-current-colorCurrent page text colour
--nana-breadcrumb-separator-colorSeparator glyph colour
--nana-breadcrumb-badge-bgBackground of the trailing badge
--nana-breadcrumb-badge-colorText colour of the trailing badge
--nana-breadcrumb-font-sizeItem text size
--nana-breadcrumb-gapSpace either side of the separator
--nana-breadcrumb-pill-bgItem background in the pill variant
--nana-breadcrumb-separatorThe separator glyph itself, as a CSS content value
--nana-breadcrumb-status-colorColour of the status dot
EventTypeDescription
nana-clickCustomEventFired when an interactive item (link or overflow trigger) is activated
nana-toggleCustomEventFired when a dropdown item opens or closes (detail.open)
SlotDescription
(default)The item label
prefixContent before the label (e.g. a leading nana-icon)
menuDropdown menu entries (shown when dropdown is open)
VariableDescription
--nana-breadcrumb-colorLink/label text colour
--nana-breadcrumb-color-hoverLink text colour on hover
--nana-breadcrumb-current-colorCurrent page text colour
--nana-breadcrumb-separator-colorSeparator glyph colour
PartDescription
separatorThe glyph before the item
markerThe step number marker (step variant)
linkThe <a> / <button> element (non-current, interactive items)
labelThe text wrapper (current / static items)
badgeThe trailing badge
statusThe status dot
skeletonThe loading placeholder
menuThe item dropdown menu
Explore Breadcrumb Item interactively Every state, prop, and edge case — with live controls — in Storybook.
View in Storybook