BreadcrumbupdateUPDATE
A navigation component for displaying a route trail.
Usage
Breadcrumb Props
| Prop | Type | Default |
|---|---|---|
size | "small" | "medium" | "medium" |
className | string | - |
Breadcrumb.Item Props
| Prop | Type | Default |
|---|---|---|
label | string | - |
href | string | - |
leadingIcon | ReactNode | - |
current | boolean | false |
dropdownItems | { label: string; onClick?: ReactEventHandler<HTMLDivElement> | undefined; }[] | - |
as | ReactElement<any, string | JSXElementConstructor<any>> | "<a />" |
Breadcrumb.Separator Props
| Prop | Type | Default |
|---|---|---|
children | ReactNode | "/" |
className | string | - |
Breadcrumb.Ellipsis Props
| Prop | Type | Default |
|---|---|---|
children | ReactNode | <DotsHorizontalIcon /> |
className | string | - |
Examples
Size
The Breadcrumb component supports different sizes to accommodate various design requirements. Specify the size using the size prop.
Separator
Customize the separator between breadcrumb items using the separator prop.
Ellipsis
Use the Breadcrumb.Ellipsis component to truncate the breadcrumb trail when you need to display a large number of items in a limited space.
Icons
Breadcrumb items can include icons either alongside text or as standalone elements.
Dropdown
Breadcrumb items can include dropdown menus for additional navigation options. Specify the dropdown items using the dropdownItems prop.
Note: When dropdownItems is provided, the as and href props are ignored.
As
Use the as prop to render the breadcrumb item as a custom component. By default, breadcrumb items are rendered as a tags.
When a custom component is provided, the props are merged, with the custom component's props taking precedence over the breadcrumb item's props.