Skip to main content
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

useTour API

Headless guided-tour sequencer: step collection, activator registry, form-gated navigation, programmatic activate/deactivate, and per-step enter/leave/completed handlers plus events. Built on createStep, createRegistry, and createForm.

Explore these related pages for additional context and usage patterns.

PageCategory
useTourPlugins
TourDisclosure
createStepSelection
createFormForms
createRegistryRegistration

Functions

createTour

(_options?: TourOptions) => TourContext<Z, E>

Creates a new tour instance.

createTourContext

(_options?: TourContextOptions) => ContextTrinity<TourContext<Z, E>>

Creates a tour context with dependency injection support.

createTourPlugin

(_options?: TourPluginOptions) => Plugin

Installs one tour on the app. useTour() reads it during component setup. A local provide from createTourContext shadows it for that subtree. The plugin does not store a catalog. Stop the running tour, clear its steps, and onboard the next tour's steps. Leave activators registered. reset() clears those too.

useTour

(namespace?: string) => TourContext<Z, E>

Returns the current tour context from dependency injection.

Properties

steps

StepContext<Z, E>

activators

RegistryContext<TourActivatorTicketInput, TourActivatorTicket<TourActivatorTicketInput>>

form

FormContext<FormTicketInput, FormTicket<FormTicketInput>>

isActive

Readonly<ShallowRef<boolean>>

isComplete

Readonly<ShallowRef<boolean>>

isReady

Readonly<ShallowRef<boolean>>

isFirst

Readonly<Ref<boolean, boolean>>

isLast

Readonly<Ref<boolean, boolean>>

canGoBack

Readonly<Ref<boolean, boolean>>

canGoNext

Readonly<Ref<boolean, boolean>>

selectedId

Readonly<Ref<ID | undefined, ID | undefined>>

total

number

Methods

start

(options?: { stepId?) => void

Begin the tour. No-op when !IN_BROWSER.

stop

() => void

Dismiss without marking complete.

complete

() => Promise<void>

Dismiss and mark complete. Emits completed for the current step. Resolves after an in-flight next() or step() finishes that completion, or after its gate drops it. From inside the submit that gate is already awaiting, it requests completion and resolves so that submit can finish.

reset

() => void

Stop, reset the form, and clear steps and activators.

next

() => Promise<void>

Advance one step. No-op while inactive, unready, or on the last step. Validates the current form field when one is registered under this step id.

prev

() => Promise<void>

Move back one step. No-op while inactive, unready, or on the first step. Does not validate and does not emit completed.

step

(index: number) => Promise<void>

Jump to a 1-based step index. Validates when leaving a form step.

activate

(target: MaybeElementRef, options?: TourActivateOptions) => void

Register a programmatic activator for the current step.

deactivate

() => void

Unregister the programmatic activator and restore anchor-name.

ready

(stepId: ID, visit: number) => void

Mark this entry ready from outside the handler. No-op unless the tour is active, stepId is still selected, and visit is the token from that entry's context.

Was this page helpful?

© 2016-1970 Vuetify, LLC
Services
Ctrl+/