Skip to content

Breadcrumb

The Breadcrumb is a simple navigational component that indicates the location of the current page within a list to parent pages in the navigation hierarchy. It helps users find their place within a website or web application. Breadcrumbs are often placed horizontally in front of the main content of a page. The elements are split by a sperator, either by css or by a given string. The component implements the W3C ARIA APG Breadcrumb Pattern.

Examples

Base

To determine the current page, set the active prop. Individual items can be disabled using the disabled prop.

Separators

Dividers are automatically added in CSS by the theme. In addition, the component allows you to customise the seperator using the seperator prop. The seperator slot can be used if further customisation is needed.

Options

Instead of using the <o-breadcrumb-item> component directly inside the default slot, an options prop can be set, which allows the options to be set programmatically. It accepts several different formats of values:

  • An array of primitives ['A', 'B', 'C']
  • An array of objects with label and attrs properties

Variants

Different styles can be achieved with the variant prop.

Sizes

The component can be displayed in different sizes using the size prop.

Positions

For alternative alignments, the breadcrumb can be positioned by the position prop.

Icons

You can add an icon to the item to explain its function more visually.

Tags

By default the breadcrumb items are represented as HTML a tag elements. The HTML tag can be customised using the tag prop for an item, for example to define links using vue-router and router-link tag.

The classic breadcrumb, in different colors, sizes, and states

html
<o-breadcrumb></o-breadcrumb>

Props

Prop nameDescriptionTypeValuesDefault
ariaLabelAccessibility aria-label to be passed to the nav wrapper elementstring-
From config:
modal: {
  ariaLabel: "breadcrumb"
}
optionsbreadcrumb items, unnecessary when default slot is usedSimpleOptionsProp-
overrideOverride existing theme classes completelyboolean-
positionPosition of the breadcrumb"centered" | "left" | "right"left, centered, right
From config:
breadcrumb: {
  position: "left"
}
separatorThe separator between breadcrumb itemsstring-
From config:
breadcrumb: {
  separator: undefined
}
sizeSize of the breadcrumbstringsmall, medium, large
From config:
breadcrumb: {
  size: "small"
}
variantColor variant of the breadcrumbstringprimary, info, success, warning, danger, and any other custom color
From config:
breadcrumb: {
  variant: "primary"
}

Slots

NameDescriptionBindings
defaultPlace breadcrumb items here

The classic breadrcumb item, in different colors, sizes, and states

html
<o-breadcrumb-item></o-breadcrumb-item>

Props

Prop nameDescriptionTypeValuesDefault
activeWhether item is active or notboolean-false
disabledItem is disabledboolean-false
hiddenDefine whether the item is visible or notboolean-false
iconLeftIcon name to show on the leftstring-
iconPackIcon pack to usestringmdi, fa, fas and any other custom icon pack
From config:
breadcrumb: {
  iconPack: undefined
}
iconRightIcon name to show on the rightstring-
iconSizeIcon sizestringsmall, medium, large
From config:
breadcrumb: {
  iconSize: undefined
}
labelItem label, unnecessary when default slot is usedstring-
overrideOverride existing theme classes completelyboolean-
tagItem tag nameDynamicComponentli, a, router-link, nuxt-link (or other nuxt alias)
From config:
breadcrumb: {
  tag: "a"
}

Slots

NameDescriptionBindings
seperatorItem seperatorseperator string - seperator string
defaultOverride label

Class Inspector

Classes applied to the element:
Class propDescriptionPropsSuffixes
rootClassClass of the root element.
sizeClassClass of the root element with size.sizesmall
medium
large
variantClassClass of the root element with variant.variantprimary
info
warning
danger
positionClassClass of the breadcrumb with alignment.positionleft
center
right
listClassClass of the list element.
itemClass Class of the item element.
disabledClassClass of the item element when disabled.disabled
activeClassClass of the item element when active.active
seperatorClassClass of the item seperator element.separator
linkClassClass of the item link element.
iconClassClass of the item icon element.iconLeft
iconRight
iconLeftClassClass of the item left icon element.iconLeft
iconRightClassClass of the item right icon element.iconRight

Sass variables

Current theme ➜ Oruga

The theme does not have any custom variables for this component.

Current theme ➜ Bulma

The theme does not have any custom variables for this component.

Current theme ➜ Bootstrap

The theme does not have any custom variables for this component.

Released under the MIT License.