Command Palette

Search for a command to run...

Guided Tour

shadcn/ui

A component for creating interactive guided tours that walk users through your application step by step. Includes forward and backward navigation, dark overlay, and customizable content for each step.

import {	GuidedTourProvider,	GuidedTour,	GuidedTourTrigger,	GuidedTourStep,	GuidedTourOverlay,} from "@/registry/optics/guided-tour";import { Button } from "@/registry/optics/button";function MyComponent() {	return (		<GuidedTourProvider>			<GuidedTour>				<GuidedTourOverlay />								<GuidedTourTrigger tourId="welcome-tour" asChild>					<Button>Start Tour</Button>				</GuidedTourTrigger>				<div className="space-y-4">					<GuidedTourStep						tourId="welcome-tour"						step={1}						content={							<div>								<h3 className="font-semibold mb-2">Welcome</h3>								<p className="text-sm text-muted-foreground">									This is the first step of the tour.								</p>							</div>						}					>						<Button>Main Button</Button>					</GuidedTourStep>					<GuidedTourStep						tourId="welcome-tour"						step={2}						content={							<div>								<h3 className="font-semibold mb-2">Second Step</h3>								<p className="text-sm text-muted-foreground">									Here you can see the second element.								</p>							</div>						}					>						<Input placeholder="Input field" />					</GuidedTourStep>					<GuidedTourStep						tourId="welcome-tour"						step={3}						content={							<div>								<h3 className="font-semibold mb-2">Final</h3>								<p className="text-sm text-muted-foreground">									This is the last step of the tour.								</p>							</div>						}					>						<Button variant="secondary">Finish</Button>					</GuidedTourStep>				</div>			</GuidedTour>		</GuidedTourProvider>	);}

Installation

pnpm dlx shadcn@latest add https://optics.agusmayol.com.ar/r/guided-tour.json

Props

<GuidedTourProvider />
Name
Type
No props required

<GuidedTour />
Name
Type
No specific props
<GuidedTourOverlay />
Name
Type
No specific props
<GuidedTourTrigger />
Name
Type
className
string
tourId
string (required)
asChild
boolean (default: false)
<GuidedTourStep />
Name
Type
className
string
tourId
string (required)
step
number (required)
content
ReactNode (required)