Skip to content

Options

OptionDefaultWhat it does
stepsnoneRequired.
idnoneUsed by remember, and written into the root as a data attribute.
blockingtrueApply inert to the rest of the page. Also hides that content from assistive tech.
interactivetrueKeep the spotlighted element usable. Ignored when blocking is false.
placement'bottom'Default for every step.
fallbackPlacements[]Tried in order when your first pick doesn’t fit (JS strategy).
offset / padding / radius12 / 6 / autoTour-wide geometry defaults.
strategy'auto'auto, anchor or js. See Browser support.
keyboardtrueEscape, arrows, Home and End.
exitOnEscapetrueEscape cancels the tour.
exitOnOverlayClickfalseClicking the dim cancels. Needs blocking.
showClosetrueShow the × in the card corner.
showProgresstrueShow the progress dots.
showCountertrueShow the “Step n of m” line.
animate'auto'auto honours prefers-reduced-motion, true always animates, false never does.
fliptrueMorph the card between steps instead of jumping. The shell glides and resizes while the content cross-fades.
injectStylestrueSet false if you’re importing the CSS yourself.
containerdocument.bodyWhere the tour DOM gets appended.
onMissingTarget'skip'skip, center or error.
rememberfalseWrites guidepost:<id> to localStorage on completion.
labelsEnglishEvery string is overridable. See Labels.

Labels

labels takes a Partial<TourLabels>, so override only the strings you care about.

FieldTypeWhat it does
nextstringNext button.
backstringBack button.
donestringNext button on the last step.
closestringAccessible name for the close ×.
counter(index, total) => stringBuilds the card’s counter text, e.g. “Step 2 of 5”.
progressstringAccessible name for the progress dots.

Callbacks

new Tour({
steps,
onStart: (tour) => analytics.track('tour_started'),
onShow: (tour, step, i) => analytics.track('tour_step', { id: step.id, i }),
onComplete: (tour) => analytics.track('tour_completed'),
onCancel: (tour) => analytics.track('tour_abandoned', { at: tour.index }),
onDestroy: (tour) => {},
});