Content
- Use each page’s own title as its crumb, so the trail matches the headings.
- Keep crumbs short. Each stops at 200px, or 120px on a phone, and ends in an ellipsis.
Shows where a page sits in the hierarchy, and links back up it.
Select an ancestor to go up to it. At depth 6, turn on Truncate and open the hidden levels.
<WildBreadcrumbs
:items="items"
separator="chevron"
size="md"
@click="goTo"
/><WildBreadcrumbs :items="items" />The default is chevron. Use one style across the product.
<WildBreadcrumbs :items="items" separator="slash" />The default is md. Below 640px wide, md and lg step down a size.
<WildBreadcrumbs :items="items" size="sm" />Set maxItems when the trail won’t fit on one line. The middle collapses into an ellipsis, and the ends stay.
<WildBreadcrumbs :items="items" :max-items="3" />The trail is a navigation landmark named Breadcrumb, and a list, so a screen reader announces how many crumbs it holds. The last crumb is marked as the current page and isn’t in the tab order.
| Key | What it does |
|---|---|
| Tab | Moves through the ancestors and the ellipsis, in order. |
| Enter | Opens the focused level. |
| Enter / Space | On the ellipsis, shows the hidden levels and focuses the first. |
| Prop | Type | Default | Description |
|---|---|---|---|
| items | BreadcrumbItem[] | — | The trail, root first and current page last. |
| items[].label | string | — | The crumb text. |
| items[].href | string | — | The page the crumb opens. Give every ancestor one. |
| items[].disabled | boolean | false | Shows the crumb as text that can’t be opened. |
| separator | 'chevron' | 'slash' | 'dot' | 'chevron' | The mark between crumbs. |
| maxItems | number | 0 | Crumbs shown before the middle collapses. 0 shows all. |
| size | 'sm' | 'md' | 'lg' | 'md' | Text size: 12, 13 or 14px. |
| onClick | (item, index) => void | — | Runs for an ancestor without an href. |
| Token | Value | Where it lands |
|---|---|---|
| --font-size-sm / md / base | 12 / 13 / 14px | Crumb text at sm, md and lg. |
| (no token) | #4F4D55 | Ancestor text. |
| --global-blue-1100 | #0C296A | Ancestor text on hover, 12.75:1 on the hover ground. |
| --color-primary-light | #EBFAFF | Ancestor ground on hover. |
| --color-grey-1000 | #2D2B32 | The current page. |
| --font-weight-semibold | 500 | The current page. |
| --color-grey-700 | #ADACB0 | Separators and disabled crumbs. |
| --radius-sm | 4px | Hover ground corners. |
| --color-primary-active | #1877F2 | Keyboard focus ring. |
| --duration-normal | 150ms | Hover and focus transitions. |