Skip to content

Breadcrumb

Displays the current page path and allows quick navigation back to any previous page.

Showcase

The breadcrumb component supports dynamic level management and smart path collapsing.

Max items:
Smart Overflow

Basic Usage

The most basic usage. Use the to prop to set the navigation path.

Basic Usage

Custom Separator

Customize the separator string with the separator prop.

Custom Separator

🚀 Advanced Features

1. Smart Overflow Collapse

When navigation levels are too deep, setting max-items will automatically collapse intermediate items into .... This greatly protects UI layout in narrow containers or deeply nested business logic.

The component's underlying layer automatically detects the Nuxt environment. When used in Nuxt 3/4, route navigation is automatically handled by NuxtLink, supporting Prefetch.

Use in Nuxt

YhBreadcrumb fully supports Nuxt auto-import.

Use in Nuxt

API

PropDescriptionTypeDefault
separatorSeparator stringstring/
separator-iconSeparator icon componentstring | Component
max-itemsMaximum number of displayed items, collapses when exceedednumber0 (no collapse)
PropDescriptionTypeDefault
toRoute navigation targetstring | object
replaceWhether to replace the current routebooleanfalse

Theme Variables

VariableDescriptionDefault
--yh-breadcrumb-font-sizeFont size14px
--yh-breadcrumb-item-colorDefault text colorvar(--yh-text-color-regular)
--yh-breadcrumb-last-colorLast item text colorvar(--yh-text-color-primary)

Released under the MIT License.