Skip to main content
Vuetify0 is now in alpha!
Vuetify0 Logo
Theme
Mode
Palettes
Accessibility
Vuetify One
Sign in to Vuetify One

Access premium tools across the Vuetify ecosystem — Bin, Play, Studio, and more.

Not a subscriber? See what's included

createBreadcrumbs

A composable that extends createSingle for breadcrumb navigation with automatic path truncation.

Usage

The createBreadcrumbs composable manages an ordered path of items. When you select an earlier item, everything after it is removed. Use values() to iterate the current trail for rendering.

Context / DI

Use createBreadcrumbsContext to share a breadcrumbs instance across a component tree:

ts
import { createBreadcrumbsContext } from '@vuetify/v0'

export const [useBreadcrumbs, provideBreadcrumbs, breadcrumbs] =
  createBreadcrumbsContext({ namespace: 'my:breadcrumbs' })

// In parent component
provideBreadcrumbs()

// In child component
const nav = useBreadcrumbs()
nav.register({ text: 'Settings' })

Architecture

createBreadcrumbs extends createSingle with path truncation and derived navigation state:

The Breadcrumbs component consumes createBreadcrumbs as its backing model, similar to how Tabs.Root uses createStep.

Reactivity

Breadcrumb state is always reactive. All derived properties update automatically when items are registered, unregistered, or navigated.

Property/MethodReactiveNotes
depthRef — count of registered items
isRootRef — depth <= 1
isEmptyRef — depth === 0
selectedIdComputed — current (last) item ID
selectedItemComputed — current item ticket
selectedValueComputed — current item value
selectedIndexComputed — current item position
Tip

Depth tracking Use depth, isRoot, and isEmpty to conditionally render navigation controls like a “Back” button or hide the breadcrumb trail when at the root level.

Examples

API Reference

The following API details are for the createBreadcrumbs composable.
Was this page helpful?

Ctrl+/