Feedback
Tour
A guided walk through a screen, one spotlight at a time.
Ant Design: Tour
import { Tour } from '@alea/ui';
Examples
Tour
Each step points at part of the page.
Props
Tour props
A guided walk through a screen: each step spotlights an element and explains it (Ant's Tour). Escape skips; focus stays in the step.
| Prop | Type | Default | Description |
|---|---|---|---|
isOpenrequired | boolean | - | Whether the tour runs (controlled). |
onOpenChangerequired | (open: boolean) => void | - | Called when it starts or ends. |
stepsrequired | TourStep[] | - | The steps: target (a CSS selector), title and content. |
onFinish | (() => void) | - | Called when the last step is done. |
Accessibility
- Each step is a dialog; focus moves to Next; Skip is always there.
Keyboard
| Key | Does |
|---|---|
| Enter | Next |
| Escape | Skip the tour |
Do and don't
Do
- Keep it to five steps or fewer.
Don't
- Don't start it on every visit.