Overlays
Tour <pm-tour>
Product tour: a card that points at one part of the page at a time, with Back, Next and Skip.
Overview
Give it steps and call start(), or use a button: <pm-button commandfor="tour" command="--start">. The highlighted element is scrolled into view, the rest of the page is dimmed, focus moves into the card and returns to where it was when the tour ends. Escape skips the tour.
Attributes
| Attribute | Type | Default | Description |
|---|---|---|---|
steps | TourStep[] | — | JSON array of { target, title, text } (also a property). |
label | string | — | Accessible name of the tour (default "Tour"). |
Also accepts the contextual attributes tone, surface, radius, density, motion, elevation. They are inherited from ancestors' data-* attributes.
Events
| Event | React / Svelte prop | Description |
|---|---|---|
pm-step | onPmStep | A step is shown. |
pm-finish | onPmFinish | The last step was completed. |
pm-skip | onPmSkip | The tour was closed early. |
Methods
start(), next(), back(), finish(), skip()