Custom Breadcrumbs
Page header breadcrumb with heading, actions and link list.
Installation
bun add @xerobi/ui
import { BackLink, BreadcrumbsLink, CustomBreadcrumbs, MoreLinks } from "@xerobi/ui/custom-breadcrumbs"This component is client-side. In Astro, hydrate it with a client directive.
API reference
BackLink
| Prop | Type | Description |
|---|---|---|
| label | string | |
| render | ReactElement<Record<string, unknown>, string | JSXElementConstructor<any>> |
BreadcrumbsLink
| Prop | Type | Description |
|---|---|---|
| name | string | |
| href | string | |
| disabled | boolean | |
| icon | string | number | bigint | boolean | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal | Promise<AwaitedReactNode> | |
| render | ReactElement<Record<string, unknown>, string | JSXElementConstructor<any>> | Router link element used when `href` is set. |
CustomBreadcrumbs
| Prop | Type | Description |
|---|---|---|
| heading | string | |
| activeLast | boolean | Make the last crumb a link too (it is plain text by default). |
| backHref | string | |
| action | string | number | bigint | boolean | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal | Promise<AwaitedReactNode> | |
| links | BreadcrumbsLinkProps[] | |
| moreLinks | string[] | |
| linkRender | ReactElement<Record<string, unknown>, string | JSXElementConstructor<any>> | Router link element applied to every crumb with an `href`. |
| slots | { breadcrumbs?: ReactNode; } | |
| slotProps | { heading?: DetailedHTMLProps<HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement> | undefined; content?: DetailedHTMLProps<HTMLAttributes<HTMLDivElement>... |
MoreLinks
| Prop | Type | Description |
|---|---|---|
| links | string[] |