Breadcrumbs
Displays navigation hierarchy.
import { Breadcrumb, Crumb } from '@brainandbones/skeleton';
Examples
Basic
Separator
Icons
Mixed
Usage
<Breadcrumb>
<Crumb href='/'>
<svelte:fragment slot="lead">(icon)</svelte:fragment>
<span>(page)</span>
</Crumb>
<Crumb href='/'>(page)</Crumb>
<Crumb>(current)</Crumb>
</Breadcrumb>
Current Page Crumb
Crumbs without a href
attribute are treated as the current page. This means they render as span
and do not append a trailing separator.
<Crumb>Current</Crumb>
Properties
Breadcrumb
Prop | Type | Default | Description |
---|---|---|---|
separator | string | &rsaquo (unicode) | Defines the crumb separator. Supports SVG icons. |
Crumb
Prop | Type | Default | Description |
---|---|---|---|
text | string | text-base | Provide classes to set text size. |
color | string | - | Provide classes set the current page text color. |
Slots
Crumb
Slot | Description |
---|---|
lead | A leading slot intended for icons. |
Accessibility
ARIA GuidelinesBreadcrumb
Prop | Default | Description |
---|---|---|
label | - | A semantic ARIA label. |