Breadcrumb
moleculesA path of links to the current page: wraps or truncates, collapses the middle with an ellipsis, and takes any separator.
File manager location
items with href for every ancestor; the last item is the current page and renders as text.
Breadcrumb.svelte
162 lines · modified 2 hours agoSizes and separators
size="sm" | "md", char swaps the glyph, separator is a snippet, collapseCurrent hides the last item on narrow screens.
Overflow
maxItems collapses the middle into an ellipsis; wrap={false} truncates inside a narrow box; a single item is just the current page.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
items required | BreadcrumbItem[] | — | |
char | string | — | Separator character; ignored when the `separator` snippet is set. |
separator | Snippet | — | |
maxItems | number | 0 | Collapse the middle to an ellipsis when the trail is longer than this (0 = never collapse). Keeps the first item and the last `maxItems - 1`; values below 2 behave as 2 so the current page always shows. |
size | 'sm' | 'md' | 'sm' | |
wrap | boolean | true | `false` keeps the trail on one line: ancestors keep their width and the current crumb shrinks with an ellipsis. |
collapseCurrent | boolean | false | Hide the current crumb and its separator, keeping only the ancestors. |
class | string | '' | |
style | string | '' |