# useTour API

> Auto-generated API reference for `useTour` from @vuetify/v0 (Vuetify0).
> Source of truth: https://0.vuetifyjs.com/api/use-tour

## Related

- https://0.vuetifyjs.com/composables/plugins/use-tour
- https://0.vuetifyjs.com/components/disclosure/tour
- https://0.vuetifyjs.com/composables/selection/create-step
- https://0.vuetifyjs.com/composables/forms/create-form
- https://0.vuetifyjs.com/composables/registration/create-registry

## Functions

### createTour

Creates a new tour instance.

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

### createTourContext

Creates a tour context with dependency injection support.

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

### createTourPlugin

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.

```ts
(_options?: TourPluginOptions) => Plugin
```

### useTour

Returns the current tour context from dependency injection.

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

## Methods

| Name | Type | Description |
|---|---|---|
| `start` | `(options?: { stepId?: ID; }) => 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. |

## Properties

| Name | Type | Description |
|---|---|---|
| `steps` | `StepContext<Z, E>` | — |
| `activators` | `RegistryContext<TourActivatorTicketInput, TourActivatorTicket<TourActivatorTicketInput>>` | — |
| `form` | `FormContext<import("/home/runner/work/0/0/packages/0/src/composables/createForm/index").FormTicketInput, import("/home/runner/work/0/0/packages/0/src/composables/createForm/index").FormTicket<import("/home/runner/work/0/0/packages/0/src/composables/createForm/index").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` | — |
