Tour
An interactive guided tour that highlights UI elements and walks users through features.
When to Use
- For onboarding new users to your application
- To highlight new features after an update
- For step-by-step tutorials within the interface
Import
Examples
Basic Usage
A simple tour is controlled by open state and a list of steps.
Primary Type
Use type="primary" for a more prominent tour overlay.
Centered Step (No Target)
Steps without a target are displayed centered on the screen.
Note
Tour is a stateful component that requires useRef and useState for full interactivity. The examples above show the component API — try it in your own app with real refs.
API
TourProps
steps—TourStepConfig[]— Array of tour step configurations (required)open—boolean— Whether the tour is visible (controlled)current—number— Current step index (controlled)type—"default" | "primary"— Tour visual style (default:"default")mask—boolean— Show background mask overlay (default:true)arrow—boolean— Show arrow pointing to target (default:true)zIndex—number— Z-index of the tour overlay (default:1001)indicatorsRender—(current: number, total: number) => ReactNode— Custom step indicatorsonChange—(current: number) => void— Step change callbackonClose—() => void— Close callbackonFinish—() => void— Callback when tour completes
TourStepConfig
target—RefObject | (() => HTMLElement) | null— Element to highlighttitle—ReactNode— Step titledescription—ReactNode— Step descriptioncover—ReactNode— Cover image or contentplacement—"top" | "bottom" | "left" | "right" | "topLeft" | "topRight" | "bottomLeft" | "bottomRight" | "center"— Tooltip positionmask—boolean— Override global mask settingmaskStyle—CSSProperties— Custom mask stylesnextButtonProps—ButtonProps— Customize the Next buttonprevButtonProps—ButtonProps— Customize the Prev button