Breadcrumbs

Breadcrumbs show hierarchy navigation with ordered list semantics and current page support.

Overview and decision boundary

Use Breadcrumbs to show the current page position in a hierarchy and provide native anchor links back to parent levels.

Do not use Breadcrumbs as a sidebar, tabs replacement, or command navigation.

Preview

import { Breadcrumbs } from '@nerio-ui/ui';<Breadcrumbs items={[{ label: 'Docs', href: '/docs' }, { label: 'Components', href: '/docs/components' }, { label: 'Button' }]} />

Installation and imports

Install the editable registry source, or use the matching package entrypoint when the product keeps Nerio as a workspace dependency.

pnpm dlx nerio add breadcrumbsimport { Breadcrumbs } from '@nerio-ui/ui';

Usage

import { Breadcrumbs } from '@nerio-ui/ui';<Breadcrumbs items={[{ label: 'Docs', href: '/docs' }, { label: 'Components', href: '/docs/components' }, { label: 'Button' }]} />

Variants

VariantPurpose
DefaultSingle semantic trail with parent links and a current page.

Anatomy

SlotPurpose
rootNav landmark with aria-label="Breadcrumb" by default.
listOrdered list that preserves hierarchy semantics.
itemOne hierarchy level in the trail.
linkNative anchor for parent destinations.
currentCurrent page item marked with aria-current="page".
separatorDecorative separator hidden from assistive technology.

States

StatePurpose
Linked parentParent items render native anchors.
Current pageThe final item is text with aria-current="page".
FocusLinked items use the shared Nerio focus ring.

Motion

  • hover
  • focus

Accessibility

  • Renders a nav landmark with aria-label="Breadcrumb" by default.
  • Uses ordered list semantics for the hierarchy trail.
  • Marks the current page with aria-current="page".
  • Separators are decorative and hidden from assistive technology.

API

PropPurpose
itemsArray of labels with optional href values and current flags for parent destinations.
aria-labelDefaults to Breadcrumb and can be customized for local context.
classNameExtends the nav root without replacing tokenized defaults.

Implementation contract

ContractValue
Registry itembreadcrumbs installs 5 source files into the configured components directory.
Base UINo interactive primitive required.
Registry dependenciesNone.
Package dependenciesclsx, react, tailwind-merge, tailwindcss

Styling contract

ContractValue
AuthoringComplete, statically detectable Tailwind CSS v4 recipes own component visuals.
ValuesSemantic and component --n-* variables remain the canonical customization layer.
OverridesCustomizable slots merge consumer className values with tailwindCn so conflicting utilities resolve deterministically.
Residual CSSOnly shared keyframes and scoped no-Preflight compatibility rules remain; there is no parallel visual selector layer.

Design notes

  • Use Breadcrumbs to show the current page position in a hierarchy and provide native anchor links back to parent levels.

Do / do not

Do

Use for hierarchical docs, settings, object detail, and nested product pages.

Do not

Do not use Breadcrumbs as a sidebar, tabs replacement, or command navigation.

Tokens

These are the primary customization points. Override semantic or component tokens instead of changing component source.

TokenPurpose
--n-breadcrumbs-gapPublic customization point for this component contract.
--n-breadcrumbs-separator-colorPublic customization point for this component contract.
--n-link-colorPublic customization point for this component contract.
--n-link-color-mutedPublic customization point for this component contract.
--n-motion-hover-durationPublic customization point for this component contract.
--n-motion-hover-easingPublic customization point for this component contract.
--n-focus-ringPublic customization point for this component contract.