Usage
Use the Breadcrumb component to show the current page's location in your site's hierarchy.
{
"wait": "Loading client-side content..."
}Items
Use the items prop as an array of objects with the following properties:
label?: stringicon?: IconComponentavatar?: AvatarPropsslot?: stringclass?: anyb24ui?: { item?: ClassNameValue, link?: ClassNameValue, linkLeadingIcon?: ClassNameValue, linkLeadingAvatar?: ClassNameValue, linkLabel?: ClassNameValue, separator?: ClassNameValue, separatorIcon?: ClassNameValue }
You can pass any property from the Link component such as to, target, etc.
{
"wait": "Loading client-side content..."
}A
span is rendered instead of a link when the to property is not defined.Separator Icon
Use the separator-icon prop to customize the Icon between each item.
{
"wait": "Loading client-side content..."
}Examples
With separator slot
Use the #separator slot to customize the separator between each item.
With custom slot
Use the slot property to customize a specific item.
You will have access to the following slots:
#{{ item.slot }}#{{ item.slot }}-leading#{{ item.slot }}-label#{{ item.slot }}-trailing
You can also use the
#item, #item-leading, #item-label and #item-trailing slots to customize all items.API
Props
Slots
Theme
app.config.ts
export default defineAppConfig({
b24ui: {
breadcrumb: {
slots: {
root: 'relative min-w-0',
list: 'flex items-center gap-[6px]',
item: 'flex min-w-0',
link: 'group relative flex items-center gap-[6px] text-(length:--ui-font-size-sm) min-w-0 -mt-px focus-visible:outline-(--ui-color-accent-main-primary)',
linkLeadingIcon: 'shrink-0 size-[20px]',
linkLeadingAvatar: 'shrink-0',
linkLeadingAvatarSize: '2xs',
linkLabel: 'truncate',
separator: 'flex',
separatorIcon: 'shrink-0 size-[20px] text-(--ui-color-base-6)'
},
variants: {
active: {
true: {
link: 'text-(--ui-color-design-selection-content) hover:text-(--ui-color-accent-main-primary-alt-2) hover:underline font-(--ui-font-weight-semi-bold)'
},
false: {
link: 'text-(--b24ui-typography-legend-color) font-(--ui-font-weight-medium)'
}
},
disabled: {
true: {
link: 'cursor-not-allowed opacity-30'
}
},
to: {
true: ''
}
},
compoundVariants: [
{
disabled: false,
active: false,
to: true,
class: {
link: 'hover:text-(--ui-color-accent-main-primary-alt-2) hover:underline transition-colors'
}
}
]
}
}
})
vite.config.ts
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import bitrix24UIPluginVite from '@bitrix24/b24ui-nuxt/vite'
export default defineConfig({
plugins: [
vue(),
bitrix24UIPluginVite({
b24ui: {
breadcrumb: {
slots: {
root: 'relative min-w-0',
list: 'flex items-center gap-[6px]',
item: 'flex min-w-0',
link: 'group relative flex items-center gap-[6px] text-(length:--ui-font-size-sm) min-w-0 -mt-px focus-visible:outline-(--ui-color-accent-main-primary)',
linkLeadingIcon: 'shrink-0 size-[20px]',
linkLeadingAvatar: 'shrink-0',
linkLeadingAvatarSize: '2xs',
linkLabel: 'truncate',
separator: 'flex',
separatorIcon: 'shrink-0 size-[20px] text-(--ui-color-base-6)'
},
variants: {
active: {
true: {
link: 'text-(--ui-color-design-selection-content) hover:text-(--ui-color-accent-main-primary-alt-2) hover:underline font-(--ui-font-weight-semi-bold)'
},
false: {
link: 'text-(--b24ui-typography-legend-color) font-(--ui-font-weight-medium)'
}
},
disabled: {
true: {
link: 'cursor-not-allowed opacity-30'
}
},
to: {
true: ''
}
},
compoundVariants: [
{
disabled: false,
active: false,
to: true,
class: {
link: 'hover:text-(--ui-color-accent-main-primary-alt-2) hover:underline transition-colors'
}
}
]
}
}
})
]
})