ValyroUI Русская версия

Tour

Onboarding tour: element spotlight, steps, progress and resume. Pro · Overlays and notifications › Popovers and tours

Product tour: dims the page around a spotlight on each step's target, with a card (title, body, media, progress) next to it. Steps can wait on async work, the target scrolls into view, arrow keys page through the steps and the step is controllable, so a tour can resume where it was left.

Installation

npx valyro-cli@latest login
npx valyro-cli@latest add tour
npm install valyro-ui-pro

import 'valyro-ui-pro/styles.css';
import { Tour } from 'valyro-ui-pro';

Props

PropTypeDefault
steps *TourStep[]Stops in order; each spotlights its target (or is centered without one) with a card of title, text and media.
openbooleanControlled open; use with onOpenChange.
defaultOpenbooleanfalseInitial open when uncontrolled.
onOpenChange(open: boolean) => voidCalled with the new open when it changes.
stepnumberCurrent step; keep it to resume the tour where the user left.
defaultStepnumber0Initial step when uncontrolled.
onStepChange(step: number) => voidCalled with the new step when it changes.
onFinish() => voidCalled when the user presses Done on the last step.
onSkip(step: number) => voidCalled when the user leaves early (✕ or Escape), with the step they left on.
closeOnEscapebooleantrueEscape skips the tour. Default true.
closeOnOverlayClickbooleanfalseA click on the dimmed backdrop skips the tour. Default false.
showProgressbooleantrueProgress dots. Default true.
classNamestringClass for the card.
labelsPartial<TourLabels>Overrides for the built-in English text; keys left out keep their defaults.

Related components

Previous: Hover Card · Next: Text Input · All Overlays and notifications