UIComponentsReact
A guided walk through the page: a dimmed backdrop with a ring around one element at a time, and a card beside it that explains the element.
Built on the headless Tour.See its API in Docs
Rendered by React 19.3.1
Installation
npx shadcn@4.23.0 add https://hamur.dev/r/react/tour.jsonIt also adds utils, button. The app needs its setup first: Installation.
Usage
Give Tour its steps, each with an id, an optional target and the data the app shows. Put a TourTrigger in it to start the tour, and in the TourPortal a TourBackdrop, a TourSpotlight and a TourPositioner holding the TourPopup. The popup holds a TourTitle, a TourDescription, a TourProgress and the TourPrevious, TourNext, TourSkip and TourClose buttons, with an optional TourArrow. The Tour children are a function of the shown step, which is how the title and the description change from step to step. A step without a target is centered. The target lookup, the focus trap, the keys and the announcements come from the headless Tour.
import {
Tour,
TourArrow,
TourBackdrop,
TourClose,
TourDescription,
TourNext,
TourPopup,
TourPortal,
TourPositioner,
TourPrevious,
TourProgress,
TourSkip,
TourSpotlight,
TourTitle,
TourTrigger,
} from '@/components/ui/tour'Examples
Default
A centered welcome, then two steps on a target each, with the ring and arrow.
Controlled
The open state and the step held by the app, with Previous and Next moving it.
Rendered by React 19.3.1
The Backdrop is bg-black/50 with the hole cut out of it, the Spotlight a ring-2 ring-primary box at the hole, and the Popup the Popover's card, narrowed to min(24rem, var(--available-width)) so that it fits the room beside the target. The Progress is muted tabular text. Previous is the Button's outline variant, Next its default, Skip and Close its ghost, and Previous stays focusable and dimmed on the first step. The Spotlight and the Positioner move between steps with a transition that a scroll or a resize skips (data-instant) and prefers-reduced-motion turns off. This item takes Base UI's component ID as its slug and one name per Base UI part.
API reference
The styled parts pass every prop to the headless part they wrap and add classes. The props, data attributes and keyboard are on Tour's API reference.