# TourCard

The first-visit tour's card: the welcome card, a step, or the ending. It is
a region named by its heading, not a dialog, because nothing is modal.

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

## Signature

```ts
import { TourCard } from "@mapcairn/map";
 
function TourCard(input: TourCardProps): JSX.Element | null;
```

## Parameters

- `{ tour, welcome, ending }`
- `input` (`TourCardProps`)

## Returns

`JSX.Element | null`

## Remarks

The welcome card never takes focus. Taking the tour, Next and a
 restart from Help move focus to the heading; a step finished by doing it
 leaves focus with the person. Escape inside the card skips (or closes the
 ending) and prevents the default, so the app's own Escape does not also
 close a surface. When the card closes, or its slot hides because the sheet
 is modal or the bottom row has come up to it, with focus inside it, focus
 goes to the map. A request for focus made while the slot is hidden (a
 restart from Help that closes a sheet in the same update) waits until the
 slot shows, because an inert element cannot take it. While a step is current, its control carries
 `data-tour-highlight` and is scrolled into view.

## See also

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

Source: [packages/map/src/tools/Tour/TourCard.tsx:57](https://github.com/MapCairn/mapcairn/blob/main/packages/map/src/tools/Tour/TourCard.tsx#L57)
