Skip to content

Breadcrumb Component

Breadcrumb Component

Breadcrumb is a navigation aid that allows users to understand the current page's position within the website structure and quickly return to parent pages.

Basic Usage

Basic breadcrumb usage, displaying hierarchical structure.

Show CodeArrow
CopyGitHub

Custom Separator

You can customize the separator icon by setting the separatedIcon attribute. If not set, the default / symbol is used.

Show CodeArrow
CopyGitHub

Add icons to each breadcrumb item by setting the icon attribute in options.

Show CodeArrow
CopyGitHub

Router Navigation

Set the isRouter attribute to enable router navigation functionality, used together with the to attribute in options.

Show CodeArrow
CopyGitHub

Disabled State

Set the disabled attribute in options to disable specific breadcrumb items.

Show CodeArrow
CopyGitHub

Custom Gap

You can customize the gap between separator and content by setting the gap attribute.

Show CodeArrow
CopyGitHub

Attributes

AttributeDescriptionTypeAccepted ValuesDefault
optionsBreadcrumb option dataarray[]
is-routerWhether to enable routerbooleantrue
is-replaceWhether to use replace modebooleanfalse
separated-iconSeparator iconstring
gapSeparator gapnumber6

Option Configuration

ParameterDescriptionTypeAccepted ValuesDefault
labelDisplay textstring
valueUnique identifierstring
iconIcon typestring
toRouter pathRouteRecordRaw
disabledWhether disabledbooleanfalse

Events

Event NameDescriptionParameters
changeTriggered when breadcrumb item is clicked(item: ValueType)

Style Variables

The breadcrumb component uses the following style variables, which can be customized through SCSS variables:

Variable NameDescription
$theme-color-primaryTheme color - Primary
$text-color-defaultDefault text color
$font-size-defaultDefault font size
$opacity-disabledDisabled state opacity

Released under the MIT License