Breadcrumb
BsBreadcrumb is a component that indicate the current page's location within a navigational hierarchy.
Overview
BsBreadcrumb is built from Bootstrap breadcrumb's component. Although it is a simple breadcrumb, it can be customized with many options.
Icons
Property prepend-icon
is used to display an icon before the first breadcrumb label. Use any valid android icon name from Google Material Symbols with or without a suffix. Valid suffixes are: _outlined
, _rounded
, _sharp
, _filled
, _outlined_filled
, _rounded_filled
, and _sharp_filled
. Suffix _filled
and _outlined_filled
will display the same icon style variant.
Additionally you can use slot icon
to display a custom icon.
Separators
Separator between label can be changed using property separator
. Use a simple single character or embedded SVG icon to specify the value of the separator
property.
CSS Variables
--md-breadcrumb-container-padding-x: 1.5rem;
--md-breadcrumb-container-padding-y: 0.75rem;
--md-breadcrumb-separator-color: var(--bs-gray-600);
--md-breadcrumb-icon-color: inherit;
--md-breadcrumb-font-size: inherit;
--md-breadcrumb-label-color: inherit;
--md-breadcrumb-label-active-color: var(--bs-gray-700);
--md-breadcrumb-label-hover-color: var(--bs-link-color);
--md-breadcrumb-line-height: 1.25;
API Reference
Property | Type | Default | Description |
---|---|---|---|
icon-size | Number | The size of icon to display, in pixel. | |
items required | TBreadcrumb[] | The data-source to build the breadcrumb. | |
prepend-icon | String | The icon to display before the first breadcrumb label. Use any valid android icon name from Google Material Symbols with or without a suffix. Valid suffixes are: _outlined , _rounded , _sharp , _filled , _outlined_filled , _rounded_filled , and _sharp_filled . | |
separator | String | Change the default breadcrumb label's separator. | |
sticky | Boolean | false | If true , the breadcrumb will be positioned using sticky-top. |
tag | String | 'nav' | Change the default HTML tag to render the breadcrumb container. |
TBreadcrumb
The data object to build breadcrumb data source has the following properties:
Property | Type | Description |
---|---|---|
label required | String | The breadcrumb item label. |
href | String> | Absolute or relative URL if not using vue-router. |
location | RouterLinkProps | The navigation location target. This must be an object that satifies the properties of <RouterLink> component when using vue-router. This is a shortcut to create a <RouterLink> as part of item's label. |
path | String | The route path for the navigation target. This is a shortcut to create a <RouterLink> as part of item's label. See vue-router for more information. |
pathName | String | The path name for the navigation target. This is a shortcut to create a <RouterLink> as part of item's label. See vue-router for more information. |
handler | VoidFunction | onClick event handler for this items's label.
|