Properties
Property | Type | Default Value |
---|---|---|
items | Array |
Indicate the current page's location within a navigational hierarchy. Separators are automatically
added in CSS through ::before
and content
.
<template>
<b-breadcrumb :items="items"></b-breadcrumb>
</template>
<script>
export default {
data() {
return {
items: [
{
text: 'Admin',
href: '#'
},
{
text: 'Manage',
href: '#'
},
{
text: 'Library',
active: true
}
]
}
}
}
</script>
<!-- b-breadcrumb.vue -->
Items are rendered using :items
prop. It can be an array of objects to provide link and active
state. Links can be href
's for anchor tags, or to
's for router-links. Active state of last
element is automatically set if it is undefined
.
const items = [
{
text: 'Home',
href: 'http://google.com'
},
{
text: 'Posts',
to: { name: 'home' }
},
{
text: 'Another Story',
active: true
}
]
<b-breadcrumb>
Property | Type | Default Value |
---|---|---|
items | Array |
<b-breadcrumb-item>
Property | Type | Default Value |
---|---|---|
href | String | |
rel | String | |
target | String | _self |
active | Boolean | false |
disabled | Boolean | false |
to | String or Object | |
append | Boolean | false |
replace | Boolean | false |
event | String or Array | click |
active-class | String | |
exact | Boolean | false |
exact-active-class | String | |
router-tag | String | a |
no-prefetch | Boolean | false |
text | String | |
html | String | |
aria-current | String | location |
Event | Arguments | Description |
---|---|---|
click | Native click event object | Emitted when clicked |
CHANGED in 2.0.0-rc.22 You can import individual components into your project via the following named exports:
Component | Named Export | Import Path |
---|---|---|
<b-breadcrumb> | BBreadcrumb | bootstrap-vue |
<b-breadcrumb-item> | BBreadcrumbItem | bootstrap-vue |
Example:
import { BBreadcrumb } from 'bootstrap-vue' Vue.component('b-breadcrumb', BBreadcrumb)
CHANGED in 2.0.0-rc.22 Importing plugins has been simplified.
This plugin includes all of the above listed individual components. Plugins also include any component aliases.
Named Export | Import Path |
---|---|
BreadcrumbPlugin PREFERRED | bootstrap-vue |
BreadcrumbPlugin DEPRECATED | bootstrap-vue/es/components |
default DEPRECATED | bootstrap-vue/es/components/breadcrumb |
Example:
// Importing the named export import { BreadcrumbPlugin } from 'bootstrap-vue' Vue.use(BreadcrumbPlugin)