# useTour

Runs the first-visit tour: the welcome card, the steps and the ending.

This is a function exported by `@mapcairn/map`, checked against version 0.2.0.

## Signature

```ts
import { useTour } from "@mapcairn/map";
 
function useTour(input: UseTourOptions): UseTour;
```

## Parameters

- `{ steps, version, offer, snapshot, }`
- `input` (`UseTourOptions`)

## Returns

`UseTour`

## Remarks

A step advances when the person does what it asks, judged by
 `stepDone` against the snapshot taken when the step began, or on Next.
 An advance by doing announces the next step and leaves focus where it is;
 Next and start ask the card to focus its heading instead. Taking the
 tour, skipping it, or turning on a layer while the welcome card is up
 stores the version, so the tour is not offered again.

## See also

- [`UseTourOptions`](https://docs.mapcairn.com/api/map/UseTourOptions.md)
- [`UseTour`](https://docs.mapcairn.com/api/map/UseTour-interface.md)

Source: [packages/map/src/tools/Tour/useTour.ts:78](https://github.com/MapCairn/mapcairn/blob/main/packages/map/src/tools/Tour/useTour.ts#L78)
