Skip to content

Breadcrumb

BsBreadcrumb is a component that indicate the current page's location within a navigational hierarchy.

Added since v2.1.0

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

scss
--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

TBreadcrumb

The data object to build breadcrumb data source has the following properties:

PropertyTypeDescription
label requiredStringThe breadcrumb item label.
hrefString>Absolute or relative URL if not using vue-router.
locationRouterLinkPropsThe 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.
pathStringThe 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.
pathNameStringThe 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.
handlerVoidFunctiononClick event handler for this items's label.

handler, location, pathName, path and href properties can't be mixed together. If all or some of the properties is defined, then handler will take priority.

The priorities are sorted as follows:
  1. handler (highest priority),
  2. location,
  3. pathName,
  4. path,
  5. href (lowest priority).

Released under the BSD-3-Clause License.