Skip to main content

Breadcrumbs

shadow

Breadcrumbs is a component that displays the path a user has taken within an application or site. This element displays a hierarchical page layout in which each segment of the Breadcrumb path is a hyperlink, allowing a quick return to previous levels. Breadcrumbs may contain an icon.

Basic usage

The sample shows a basic breadcrumb trail with several levels to make it clear how the navigation path is composed and where the active item is.

Use with icons

The sample adds icons directly to breadcrumb items. It's useful when you need to distinguish sections more quickly visually, not just by text.

Custom separator icon

The sample changes the default breadcrumb separator to a custom icon. This is useful when you want to bring the trail closer to the visual style of the rest of the app.

Collapsible breadcrumb

Maximum number of items

If there are more items in the list than the value of maxItems, the list is collapsed. By default, only the first and last entries are displayed.

Number of items before or after packing

When items are collapsed, the number of items to be displayed can be controlled by adding the itemsBeforeCollapse and itemsAfterCollapse properties.

Collapsed items can also be displayed as a dropdown using the collapsed-variant property with the value dropdown.

Unpacking by clicking

If you don't want a drop-down menu, the default button option will show hidden items directly in the trail when you click on the collapse indicator.

Editing styles

Colour variants

Breadcrumb colors are modified via CSS variables on wje-breadcrumb, so you can also prepare your own meaning variants for specific trails.

CSS custom variables

If you need to fine-tune the default look, edit the CSS variables for the text and hover state of individual breadcrumb items.

When to use

Use wje-breadcrumbs when the user needs to navigate the application or transition between states/screens.

When not to use

Do not use multiple parallel navigation patterns that compete with each other.

Accessibility

Provide clear active/selected states, predictable tab order, and naming of controls.

  • Keep the URL and UI state in sync to make the navigation reproducible.
  • Use consistent item terminology across menus, breadcrumb and tabs.
  • For deep structures, add auxiliary context (breadcrumb, title, icons).

Attributes and properties

breakpoint

PopisNastavuje textovú hodnotu uloženú vo voľbe breakpoint.
Atribútbreakpoint
Typstring
Predvolené-

collapsedVariant

PopisNastavuje ARIA metadáta, ktoré zlepšujú prístupnosť pre asistenčné technológie.
Atribútcollapsed-variant
Typstring
Predvolené-

itemsAfterCollapse

PopisNastavuje číselnú hodnotu používanú vo voľbe items-after-collapse.
Atribútitems-after-collapse
Typnumber
Predvolené1

itemsBeforeCollapse

PopisNastavuje číselnú hodnotu používanú vo voľbe items-before-collapse.
Atribútitems-before-collapse
Typnumber
Predvolené1

maxItems

PopisNastavuje číselnú hodnotu používanú vo voľbe max-items.
Atribútmax-items
Typnumber
Predvolené-

variant

PopisNastavuje ARIA metadáta, ktoré zlepšujú prístupnosť pre asistenčné technológie.
Atribútvariant
Typstring
Predvolenébutton

Events

Pre tento komponent nie sú dostupné žiadne udalosti.

Methods

updateCollapse

PopisAktualizuje collapse podľa najnovších údajov komponentu.
Signatúra() => void

resetCollapseState

PopisObnoví collapse state na počiatočné hodnoty.
Signatúra(breadcrumbs: Array<Element>) => void

syncManagedAttribute

PopisSynchronizuje managed attribute s externým alebo interným zdrojom stavu.
Signatúra(element: Element, name: string, isEnabled: boolean) => void

shouldApplyBreakpointCollapse

PopisSpustí metódu shouldApplyBreakpointCollapse na vykonanie logiky komponentu a aktualizáciu jeho stavu.
Signatúra() => boolean

getBreakpointWidth

PopisVráti breakpoint width z aktuálneho stavu komponentu.
Signatúra() => number|null

getBreadcrumbs

PopisVráti breadcrumbs z aktuálneho stavu komponentu.
Signatúra() => Array<Element>

getBreadcrumbsCollapsed

PopisVráti breadcrumbs collapsed z aktuálneho stavu komponentu.
Signatúra() => Array<Element>

CSS shadow parts

NázovPopis
containerŠtýluje kontajnerovú shadow časť.

CSS custom variables

Pre tento komponent nie sú dostupné žiadne vlastné CSS vlastnosti.

Slots

NázovPopis
defaultPredvolený slot pre hlavný obsah komponentu.