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#

TSX
import { Breadcrumbs } from '@sigx/daisyui';

Basic Usage#

TSX
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.

TSX
Loading preview...

Long Trails#

The list scrolls horizontally when it does not fit, so constrain the width with class rather than truncating items.

TSX
Loading preview...

Props#

PropTypeDefaultDescription
itemsBreadcrumbItem[]-The trail, in order from root to current
classstring-Additional CSS classes on the wrapper
FieldTypeDescription
idstringIdentifier passed to onNavigate when the item is clicked
labelstringText shown for the item
hrefstringOptional target for your own routing; the item is not rendered as a real href

Events#

EventTypeDescription
onNavigate(id: string) => voidFired with the item's id when it is clicked