Concepts
Completion rules
[object Object]
| Rule | The step completes when | Use it for |
|---|---|---|
tap_anchor | The user taps or clicks the spotlighted element | Buttons and links: the most natural rule |
event | Your app calls track with the step's event name | Things that finish later, like a saved form |
next_button | The user presses Next on the card | Explanations without an action |
manual | Your code calls complete with the step's id | Anything else |
JSON
{ "complete_on": { "type": "event", "name": "client_selected" } }
TypeScript
// After the user picks a client:
playstep.track('client_selected')
// Or complete a manual step by its id:
playstep.complete('fill-client')
tap_anchor listens before your own click handlers run, so the step completes even if the tap navigates to another page. A tap_anchor step needs an anchor.
While a step waits for the user, the card says Waiting for you. next_button steps show Next (or Done on the last step), and every step after the first has Back. The close button ends the guide at any time.