- Accordion
- Action Bar
- Alert Dialog
- Alert
- Announcement
- Aspect Ratio
- Autocomplete
- Avatar
- Badge
- Bottom Navigation
- Breadcrumb
- Button Group
- Button
- Calendar
- Card
- Carousel
- Chart
- Checkbox
- Circular Progress
- Circular Slider
- Clipboard
- Collapsible
- Color Picker
- Combobox
- Command
- Context Menu
- Data List
- Date Picker
- Dialog
- Drawer
- Editable
- Field
- File Upload
- Float
- Floating Panel
- Frame
- Hint
- Hover Card
- Image Cropper
- Input Group
- Input OTP
- Input
- Item
- Kbd
- Link Overlay
- Listbox
- Marquee
- Menu
- Native Select
- Number Input
- Pagination
- Popover
- Progress
- Prose
- QR Code
- Radio Group
- Rating
- Resizable
- Scroll Area
- Segment Group
- Select
- Separator
- Sheet
- Sidebar
- Signature Pad
- Skeleton
- Skip Nav
- Slider
- Spinner
- Status
- Steps
- Switch
- Table
- Tabs
- Textarea
- Timer
- Toast
- Toggle Group
- Toggle Tooltip
- Toggle
- Tooltip
- Tour
- Tree View
Installation
pnpm dlx shadcn@latest add https://shark.vini.one/r/tour.json
Usage
import { Tour, TourTrigger, TourContent, TourHeader, TourProgressText, TourTitle, TourDescription, TourFooter, TourNextStep, TourPreviousStep, } from "@/components/ui/tour";
<Tour steps={steps}> <TourTrigger>Open Tour</TourTrigger> <TourContent> <TourHeader> <TourProgressText /> <TourTitle /> <TourDescription /> </TourHeader> </TourContent> <TourFooter> <TourNextStep /> <TourPreviousStep /> </TourFooter> </Tour>
Examples
Step Types
Demonstrate all three step types in a single tour: dialog for welcome/completion, tooltip anchored to elements, and floating for fixed-position content.
Progress
Display a visual progress indicator at the bottom of the tour content showing how far along the user is.
Skip
Allow users to skip the entire tour at any step by adding a skip action.
Keyboard Navigation
Enable arrow key navigation between tour steps using the keyboardNavigation prop.
Use arrow keys to navigate, Escape to close
Events
Listen to tour lifecycle events like onStepChange and onStatusChange to track user progress.
Wait for Click
Use the effect function with waitForEvent to wait for user interaction before proceeding to the next step.
Wait for Input
Create form tutorials that wait for users to enter valid input before advancing.
Wait for Element
Wait for dynamically rendered elements to appear in the DOM before showing a step.
Async
Load data asynchronously and update step content before displaying it using the effect function with show() and update().
Custom spacing
Use [--space:--spacing("value")] on <TourContent /> to adjust panel padding (default --spacing(4)).
API Reference
Tour
| Prop | Type | Default |
|---|---|---|
steps | TourStepDetails[] | [] |
lazyMount | boolean | true |
unmountOnExit | boolean | true |
keyboardNavigation | boolean | - |
onStepChange | (details: { stepId: string | null }) => void | - |
onStatusChange | (details: { status: string }) => void | - |
immediate | boolean | - |
present | boolean | - |
onExitComplete | () => void | - |
TourTrigger
| Prop | Type | Default |
|---|---|---|
className | string | - |
TourContent
| Prop | Type | Default |
|---|---|---|
showCloseButton | boolean | true |
className | string | - |
asChild | boolean | - |
| Attribute | Default |
|---|---|
--space | --spacing(4) |
TourHeader
| Prop | Type | Default |
|---|---|---|
className | string | - |
TourTitle
| Prop | Type | Default |
|---|---|---|
className | string | - |
TourDescription
| Prop | Type | Default |
|---|---|---|
className | string | - |
TourProgressText
| Prop | Type | Default |
|---|---|---|
className | string | - |
TourFooter
| Prop | Type | Default |
|---|---|---|
className | string | - |
TourActions
| Prop | Type | Default |
|---|---|---|
className | string | - |
TourPreviousStep
| Prop | Type | Default |
|---|---|---|
asChild | boolean | - |
TourNextStep
| Prop | Type | Default |
|---|---|---|
asChild | boolean | - |
TourClose
| Prop | Type | Default |
|---|---|---|
asChild | boolean | - |
useTourContext
| Return | Type |
|---|---|
tour | UseTourReturn |
handleStart | () => void |
For a complete list of props, see the Ark UI documentation.
On This Page