Overlays
Tour
Multi-step guided product tour with target spotlighting, step counters, and keyboard dismissal.
import { Tour } from '@reactloom/ui';Examples
Two-step onboarding tour
import { Button, Tour } from '@reactloom/ui';
import { useRef, useState } from 'react';
export default function Example() {
const [open, setOpen] = useState(false);
const targetRef = useRef<HTMLButtonElement>(null);
return (
<div style={{ display: 'flex', gap: 12, alignItems: 'center' }}>
<Button ref={targetRef} onClick={() => setOpen(true)}>
Start tour
</Button>
<Tour
open={open}
onOpenChange={setOpen}
steps={[
{ title: 'Create a project', description: 'Use this action to initialize a new workspace.', target: targetRef },
{ title: 'Invite teammates', description: 'Share access from workspace settings once ready.' },
]}
/>
</div>
);
}API reference
| Prop | Type | Default |
|---|---|---|
stepsrequiredOrdered tour steps with title, description, and optional target. | readonly TourStep[] | — |
open · defaultOpenControlled or initial open state. | boolean | — |
onOpenChangeCalled when the tour opens or closes. | (open: boolean) => void | — |
onFinishCalled when the user clicks Finish on the final step. | () => void | — |
Keyboard interaction
| Key | Action |
|---|---|
| Escape | Close the tour |
| Tab | Move between Previous, Next/Finish, and Close buttons |
Usage guidelines
Do
- Keep tours short (2–5 steps) and let users dismiss them at any point.
Don’t
- Do not block primary workflows with mandatory tours on every visit.