Breadcrumb

A trail of links from the top of a hierarchy to the current page. Use it on pages nested two or more levels deep, so users can see where they are and step back up.

  • vig-breadcrumb
Import
import { Breadcrumb } from '@vigdx/ui/breadcrumb';

Basic

Pass the trail as items , from the root to the current page. Items with an href render as links, icon adds a registered icon such as home , and the last item is always the current page.

Collapsed

maxItems keeps the first item and the last maxItems - 1 , hiding the middle behind an ellipsis button that reveals the full trail. separator takes any registered icon name.

Item click

Items without an href render as buttons; handle itemClick to navigate in code, e.g. with the router or in a master–detail view. disabled items show as plain text.

Viewing: Invoice 104

Styling hooks

Internal elements carry a stable data-part and the component's data-scope; both are public API, so removing one is a breaking change. Select a part by both, e.g. [data-scope="breadcrumb"][data-part="list"] { … }: the pair stays within this component when kit components nest, and also reaches parts in overlay panels, which render outside the host. State is exposed through aria-* and, where listed, a data-state; literal values are checked by the API gate, values computed from the component's state follow its documented types. Other data-* attributes listed below (such as data-opening while an overlay animates) are API too. See Customizing.

Scope: [data-scope="breadcrumb"]

Breadcrumb styling hooks
Part Element data-state
list The <ol> . —
item One <li> . —
separator The separator icon. —
link A crumb: link, button or text. current, disabled
expand The button that shows collapsed crumbs ( maxItems ). —

Accessibility

  • Follows the WAI-ARIA APG breadcrumb pattern: a <nav> landmark around an ordered list. Its name defaults to the localized “Breadcrumb”; override it with ariaLabel when a page holds more than one trail.
  • The last item carries aria-current="page", so it is announced as the current page. With an href it stays a link, keeping the trail one consistent list of links; without one it is plain text. In forced-colors mode it is underlined, since its bolder weight is the only other cue.
  • Separators and icons are decorative and hidden from assistive technology; the separator mirrors in right-to-left layouts.
  • The ellipsis is a button named by expandAriaLabel. Activating it reveals the hidden items and moves focus to the first of them.

API

Breadcrumb

vig-breadcrumb component

Trail of links to the current page: <nav><ol><li>, the last item marked aria-current="page" — still a link when it has an href, plain text otherwise. With maxItems the middle collapses into an ellipsis button that reveals the full trail.

Example :
<vig-breadcrumb [items]="[{ label: 'Home', href: '/' }, { label: 'Parks' }]" />
Breadcrumb props
Name Type Default Description
ariaLabelstring | undefinedundefined
—
expandAriaLabelstring | undefinedundefined
—
itemsreadonly BreadcrumbItem[][]
—
maxItemsnumber | undefinedundefined

Collapses the middle of longer trails into an ellipsis (minimum 2).

separatorstring'chevron-right'

Registered vig-icon name between items; mirrored in RTL.

Are you sure?