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
andattrs
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.
Breadcrumb component
The classic breadcrumb, in different colors, sizes, and states
<o-breadcrumb></o-breadcrumb>
Props
Prop name | Description | Type | Values | Default |
---|---|---|---|---|
ariaLabel | Accessibility aria-label to be passed to the nav wrapper element | string | - | From config: modal: { |
options | breadcrumb items, unnecessary when default slot is used | SimpleOptionsProp | - | |
override | Override existing theme classes completely | boolean | - | |
position | Position of the breadcrumb | "centered" | "left" | "right" | left , centered , right | From config: breadcrumb: { |
separator | The separator between breadcrumb items | string | - | From config: breadcrumb: { |
size | Size of the breadcrumb | string | small , medium , large | From config: breadcrumb: { |
variant | Color variant of the breadcrumb | string | primary , info , success , warning , danger , and any other custom color | From config: breadcrumb: { |
Slots
Name | Description | Bindings |
---|---|---|
default | Place breadcrumb items here |
BreadcrumbItem component
The classic breadrcumb item, in different colors, sizes, and states
<o-breadcrumb-item></o-breadcrumb-item>
Props
Prop name | Description | Type | Values | Default |
---|---|---|---|---|
active | Whether item is active or not | boolean | - | false |
disabled | Item is disabled | boolean | - | false |
hidden | Define whether the item is visible or not | boolean | - | false |
iconLeft | Icon name to show on the left | string | - | |
iconPack | Icon pack to use | string | mdi , fa , fas and any other custom icon pack | From config: breadcrumb: { |
iconRight | Icon name to show on the right | string | - | |
iconSize | Icon size | string | small , medium , large | From config: breadcrumb: { |
label | Item label, unnecessary when default slot is used | string | - | |
override | Override existing theme classes completely | boolean | - | |
tag | Item tag name | DynamicComponent | li , a , router-link , nuxt-link (or other nuxt alias) | From config: breadcrumb: { |
Slots
Name | Description | Bindings |
---|---|---|
seperator | Item seperator | seperator string - seperator string |
default | Override label |
Class Inspector
Class prop | Description | Props | Suffixes | |
---|---|---|---|---|
rootClass | Class of the root element. | |||
sizeClass | Class of the root element with size. | size | small | |
variantClass | Class of the root element with variant. | variant | primary | |
positionClass | Class of the breadcrumb with alignment. | position | left | |
listClass | Class of the list element. | |||
itemClass | Class of the item element. | |||
disabledClass | Class of the item element when disabled. | disabled | ||
activeClass | Class of the item element when active. | active | ||
seperatorClass | Class of the item seperator element. | separator | ||
linkClass | Class of the item link element. | |||
iconClass | Class of the item icon element. | iconLeft | ||
iconLeftClass | Class of the item left icon element. | iconLeft | ||
iconRightClass | Class 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.