Skip to content

Tour

FeedbackMIT
View in Storybook

Step-by-step product tour overlay with anchored tooltips and progress indicator.

bun add @otfdashkit/ui

Preview

Tour
Loading Storybook preview…

Code

import { Tour, TourStep, useTour, Button } from '@otfdashkit/ui'

function TourDemo() {
  const { start, isActive } = useTour()
  return (
    <div className="p-8 space-y-6">
      <div className="flex gap-3">
        <Button onClick={start} disabled={isActive}>Start Tour</Button>
        <span className="text-sm text-[hsl(var(--muted-foreground))] self-center">Click to begin the guided tour</span>
      </div>
      <div className="flex gap-4">
        <TourStep step={0} title="Welcome!" description="This is the main dashboard." placement="bottom">
          <div className="p-4 rounded border bg-card cursor-default">Dashboard KPIs</div>
        </TourStep>
        <TourStep step={1} title="Analytics" description="Dive deeper into trends." placement="bottom">
          <div className="p-4 rounded border bg-card cursor-default">Analytics Panel</div>
        </TourStep>
        <TourStep step={2} title="Team" description="Manage team members." placement="bottom">
          <div className="p-4 rounded border bg-card cursor-default">Team Settings</div>
        </TourStep>
      </div>
    </div>
  )
}

export function Example() {
  return (
    <Tour totalSteps={3}><TourDemo /></Tour>
  )
}

Free with the SDK. This component ships in @otfdashkit/ui under the MIT license.

Kit for this component

Everything Bundle$149 · 6 kits + 20 templates

Walk new users through a product with a step-by-step tour.

See the kit

Props

Props declared in the Tour source. Inherited HTML attributes are not listed.

PropTypeDefaultDescription
childrenrequiredReactNode
totalStepsrequirednumber