Skip to content
🌏 Translated with the assistance of DeepSeek and ChatGPT

Breadcrumb ​

It's hard to associate "breadcrumb" with this UI component at all...

Basic Usage ​

Use Breadcrumb and BreadcrumbItem to build a breadcrumb navigation bar.

By default, the last item is rendered as plain text. This can be changed via the renderLastText property of Breadcrumb.

BreadcrumbItem renders an option as an <a> tag or a Vue Router RouterLink component based on its href or route property.

WARNING

href and route are directly rendered into the <a> tag. Passing values like javascript:alert(1) or malicious URLs may lead to XSS or open redirect vulnerabilities.

Hide source code

Disabled and Non-clickable ​

Use the disabled property of BreadcrumbItem to disable an item, and clickable to control whether a child item is clickable.

  • Town Hall
  • >
  • Keep
  • >
  • Castle
  • Great Hall
  • >
  • Stronghold
  • >
  • Fortress
Hide source code

Options Property ​

Use the options property to create a breadcrumb navigation bar. The string value and index field of an option are used as unique identifiers. It is recommended to ensure their uniqueness.

Hide source code

Separator ​

Set the separator via the splitter property or the splitter slot of Breadcrumb.

  • Home
  • /
  • Dashboard
  • /
  • Statistic
  • Home
  • →
  • Dashboard
  • →
  • Statistic
Hide source code

API ​

AttributeTypeOptionalDefaultDescriptionVersion
options(string | BreadcrumbOption)[]Truebreadcrumb items.0.1.0
splitterstringTrue'>'separator between items.0.1.0
renderLastTextbooleanTruetruewhether to render the last item as plain text.0.1.0
EventParameterDescriptionVersion
selectindex: string | number | symbol, event: MouseEventcallback triggered when a breadcrumb item is selected.0.1.0
SlotParameterDescriptionVersion
defaultslot for breadcrumb items.0.1.0
splitterslot for the separator.0.1.0
AttributeTypeOptionalDefaultDescriptionVersion
labelstringTrueText label.0.1.0
indexstring | number | symbolFalseUnique identifier.0.1.0
disabledbooleanTruefalseWhether the item is disabled.0.1.0
clickablebooleanTruetrueWhether the item is clickable.0.1.0
hrefstringTrueThe href attribute for the <a> tag. When provided, the text label will be rendered as an <a> element.0.1.0
routestring | objectTrueThe to parameter for Vue Router's RouterLink. When provided, the text label will be rendered as a RouterLink <a> element. If using this property, ensure Vue Router is registered globally in your Vue App.0.1.0
targetstringTrueThe target attribute for the <a> tag.0.1.0
SlotParameterDescriptionVersion
defaultSlot for the text label.0.1.0
iconSlot for the icon.0.1.0
ts
export interface BreadcrumbOption extends NavigationOption {
	disabled?: boolean
	clickable?: boolean
	href?: string
	route?: string | object
	target?: string
}

export interface NavigationOption {
	index: string | number | symbol
	label?: string
}