Fine-tune light, shadows, borders, neumorphic
Light and shadows
Borders
Neumorphic
Overlays

Tour <pm-tour>

Product tour: a card that points at one part of the page at a time, with Back, Next and Skip.

Full screen
Start the tour Settings

This component has no props to try here.

<script type="module"> import '@prismora/css'; import '@prismora/elements/button'; import '@prismora/elements/tour'; import { registerIcons } from '@prismora/elements/icon'; import { settings } from '@prismora/icons'; registerIcons([settings]); </script> <pm-button id="demo-tour-a" commandfor="demo-tour" command="--start">Start the tour</pm-button> <pm-button id="demo-tour-b" variant="outline" tone="neutral" icon-start="settings">Settings</pm-button> <pm-tour id="demo-tour" label="Product tour" steps='[{"target":"#demo-tour-a","title":"Start here","text":"This button starts the tour again at any time."},{"target":"#demo-tour-b","title":"Settings","text":"Change your theme and notifications here."},{"title":"That is it","text":"A step without a target is shown in the middle of the screen."}]'></pm-tour>

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

AttributeTypeDefaultDescription
stepsTourStep[]—JSON array of { target, title, text } (also a property).
labelstring—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

EventReact / Svelte propDescription
pm-steponPmStepA step is shown.
pm-finishonPmFinishThe last step was completed.
pm-skiponPmSkipThe tour was closed early.

Methods

start(), next(), back(), finish(), skip()