Skip to content
Nana UI

Breadcrumb Item

View .md Download

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 / Loadingdisabled, loading (skeleton placeholder). - Dropdowndropdown turns the item into a menu trigger; put the menu entries in the menu slot. - Ellipsisellipsis renders a static . - Status / Badgestatus (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.

Home Current
Terminal window
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
badgestring | undefinedA small trailing badge (e.g. a count)
completedata-completebooleanfalseWhether this step precedes the current one (step variant)
currentbooleanfalseMarks this item as the current page — rendered as text with `aria-current="page"`
disabledbooleanfalseDisables the link
dropdownbooleanfalseTurns the item into a dropdown trigger; menu entries go in the `menu` slot
ellipsisbooleanfalseRenders a static `⋯` (manual overflow indicator)
hrefstring | undefinedDestination 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
loadingbooleanfalseShows a skeleton placeholder while route data loads
relstring | undefinedRelationship of the linked resource
sizeBreadcrumbSize | undefinedSize — set by the parent `nana-breadcrumb` to keep the trail consistent
statusBreadcrumbItemStatus | undefinedStatus accent shown as a leading dot + tinted text
stepdata-stepstring | undefinedStep number shown in the `step` variant marker
target'_blank' | '_self' | '_parent' | '_top' | undefinedWhere to open the link
variantdata-variantBreadcrumbVariant | undefinedVisual 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

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
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)
VariableDefaultDescription
--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