A trail of levels from a root to the current page, rendered as nav[aria-label] > ol with aria-current="page" on the last item. Each item navigates by href, by its own onclick, or through the component’s on_navigate callback, so views without URLs (a file browser, a wizard, a dialog) work as well as routed pages. The current item is plain text unless link_current keeps it clickable.

Callback navigation and collapsing

Without href, items render as buttons and on_navigate(item, index, event) runs on activation (after the item’s own onclick, unless that prevented default). With max_items, a long trail keeps items_before levels at the start (1 by default) and fills the rest from the end, hiding the middle behind an ellipsis button. max_items must be at least 2, and items_before is capped at max_items - 1, so no more than max_items levels show. Pressing it expands the trail in place and moves focus to the first revealed level; expanded is bindable, so resetting it collapses again.

Custom rendering

separator takes a string or a snippet, item({ item, index, current }) replaces the icon and label inside the default link, button or span, and other attributes land on the <nav>, where SvelteKit link options such as data-sveltekit-preload-data reach every link. Items carry their own target, rel and title. Extra item fields reach the snippet and on_navigate. Restyle the trail with --breadcrumbs-* properties such as --breadcrumbs-gap, --breadcrumbs-color, --breadcrumbs-current-font-weight, --breadcrumbs-item-max-width (long labels ellipsize) and --breadcrumbs-wrap: nowrap.