Back to components
ElementOverlayFree

Product Tour React component

A guided product tour: a spotlight glides from element to element over a dimmed page while a card beside it explains each one, with progress dots, Back, Next and Skip, arrow keys, and automatic placement on the side that has room.

About the Product Tour component

Product Tour walks people through an interface one step at a time. Each step dims the page except for a cut-out around the element being explained, and a card next to it shows a title, a short text, a step count and Back, Next and Skip buttons. The cut-out glides from one element to the next, and the card picks whichever side has room so it always stays on screen.

steps takes objects with a target CSS selector, a title, a body and a preferred placement; a step without a target shows a centered card, which suits a welcome or a goodbye. triggerLabel adds a button that starts the tour, or open and onOpenChange control it yourself. onStepChange reports the current step and onFinish runs when Done is pressed on the last one. padding sets the space around the cut-out, closeOnOverlayClick closes it from the dimmed area, and contained keeps it inside a positioned parent.

When to use it

Use Product Tour to walk new users through a dashboard or app the first time they arrive, or to point out a new feature after a release. Each step dims everything except the thing being explained.

Keep tours short (three to five steps) and let people skip. Use onFinish to remember that someone completed it so it doesn't come back.

Installation

Add the Product Tour component to your project with the shadcn CLI. It lands in components/product-tour.tsx as plain React + Tailwind CSS source you own and can edit.

Install
Copied!
npx shadcn@latest add @reactframe/product-tour

Or copy the source by hand and install its dependencies:

Install
Copied!
npm install motion clsx tailwind-merge

More Overlay components

Command Palette
Free
Cookie Consent Banner
Free
Confirm Dialog
Free
Lightbox
Free
Hover Card
Free
Bottom Sheet
Free