Dark Light
System
Default LBBW Jira Confluence Source Code
Share
Playground

Breadcrumb

<afp-breadcrumb> Since 1.4.0 stable This component uses the light DOM, so its markup and styles are part of the regular document flow.

A breadcrumb navigation component that provides hierarchical navigation context.

Home Products Electronics Smartphones

Examples #

Max Items #

Use maxItems (maxitems) property to limit the number of visible items to prevent overflow.

Home Level 1 Level 2 Level 3 Level 4 Current Page

Expand #

Use collapseBehavior (collapsebehavior) property to determine the behavior of the ellipsis, When collapsebehavior="expand", clicking on the ellipsis expands all breadcrumb items inline, as if no maxItems was set.

Home Products Electronics Phones iPhone 15 Reset / Collapse

When collapseBehavior="dropdown", clicking on the ellipsis shows a dropdown menu containing the collapsed breadcrumb items.

Home Products Electronics Phones iPhone 15

Prefix and Suffix #

Using the prefix and suffix slots of the breadcrumb items.

Home Dashboard Settings

Custom CSS Property #

Using CSS --afp-breadcrumb-spacing property to change the breadcrumb's spacing.

Home Products Electronics Smartphones

Properties

Learn more about properties.

Name Description Reflects
ariaLabel
arialabel
Aria label for the breadcrumb navigation. This is used for accessibility purposes to provide a text alternative for screen readers.
Type string
maxItems
maxitems
Maximum number of breadcrumb items to show before collapsing.
Type number | undefined
collapseBehavior
collapsebehavior
Controls the behavior when clicking on the ellipsis.
Type
AfpBreadcrumbCollapseBehavior
Name Description
NONE
Ellipsis is static and does nothing when clicked.
EXPAND
Clicking ellipsis expands all breadcrumb items inline.
DROPDOWN
Clicking ellipsis shows a dropdown with collapsed items.
AfpBreadcrumbCollapseBehavior
Default AfpCollapseBehavior.NONE

Methods

Learn more about using methods.

Name Description Arguments
collapse
Resets the breadcrumb to its collapsed state. Useful for programmatically collapsing after expand behavior.
-
expand
Expands all breadcrumb items (removes collapse). Only works when collapseBehavior is set to 'expand'.
-

Slots

Learn more about slots.

Name Description
default
The default slot for breadcrumb items.

Internationalization

Learn more about internationalization.

Key Description
breadcrumb.aria-label
aria label for the breadcrumb navigation.
breadcrumb.ellipsis-label
aria label for the ellipsis button.
breadcrumb.dropdown-label
aria label for the dropdown container.

CSS Parts

Learn more about CSS Parts.

Name Description Selector
base
The component's base wrapper.
::part(base)
nav
The navigation container.
::part(nav)
list
The breadcrumb list container.
::part(list)
ellipsis
The ellipsis button element.
::part(ellipsis)
dropdown
The dropdown container for collapsed items.
::part(dropdown)

CSS Custom Properties

Name Description Default
--afp-breadcrumb-spacing
Spacing between breadcrumb items.
--afp-spacing-2x-small

Dependencies

The component automatically brings in the listed items, including any nested dependencies that may exist.

afp-breadcrumb-item afp-icon afp-dropdown afp-button

Importing

Using the bundle is the recommended method to include components. If you’d rather handle imports manually, you can use the code examples below.

import '@afp-design-system/core/dist/components/breadcrumb/breadcrumb.js';
Share
Create a link with a predefined theme that is automatically applied when the generated link is opened. Default LBBW Presentation Mode
Abort Copy Link