Breadcrumbs
Breadcrumbs render a trail of links showing where the current page sits in a
hierarchy. Pass the trail as an items array; each click emits the item's id
so you can route however you like.
Import
import { Breadcrumbs } from '@sigx/daisyui';
Basic Usage
Loading preview...
Handling Navigation
Every item is clickable and emits navigate with the item's id. Use it to
drive a router or, as here, to trim the trail.
Loading preview...
Long Trails
The list scrolls horizontally when it does not fit, so constrain the width with
class rather than truncating items.
Loading preview...
Props
| Prop | Type | Default | Description |
|---|---|---|---|
items | BreadcrumbItem[] | - | The trail, in order from root to current |
class | string | - | Additional CSS classes on the wrapper |
BreadcrumbItem
| Field | Type | Description |
|---|---|---|
id | string | Identifier passed to onNavigate when the item is clicked |
label | string | Text shown for the item |
href | string | Optional target for your own routing; the item is not rendered as a real href |
Events
| Event | Type | Description |
|---|---|---|
onNavigate | (id: string) => void | Fired with the item's id when it is clicked |
