A composable for managing navigation through multi-step processes like forms, wizards, or onboarding flows, with support for step tracking, completion, and navigation controls.
The useStep composable manages a list of steps and allows navigation between them with configurable circular (wrapping) or bounded (stopping at edges) behavior. You register each step (with an id and value) in the order they should be navigated, then use the navigation methods to move
ts
import { createStep } from '@vuetify/v0'// Bounded navigation (default) - for wizards, formsconst wizard =createStep({ circular: false })wizard.onboard([ { id: 'step1', value: 'Account Info' }, { id: 'step2', value: 'Payment' }, { id: 'step3', value: 'Confirmation' },])wizard.first() // Go to step1wizard.next() // Go to step2wizard.next() // Go to step3wizard.next() // Stays at step3 (bounded)// Circular navigation - for carousels, theme switchersconst carousel =createStep({ circular: true })carousel.onboard([ { id: 'slide1', value: 'First' }, { id: 'slide2', value: 'Second' }, { id: 'slide3', value: 'Third' },])carousel.last() // Go to slide3carousel.next() // Wraps to slide1carousel.prev() // Wraps to slide3
Creates a new step instance with navigation through items.
Extends `createSingle` with `first()`, `last()`, `next()`, `prev()`, and `step(count)` methods
for sequential navigation. Supports both circular (wrapping) and bounded (stopping at edges) modes.
Controls mandatory selection behavior:
- `false` (default): No mandatory selection enforcement
- `true`: Prevents deselecting the last selected item (user must always have one selected)
- `'force'`: Automatically selects the first non-disabled item on registration