Skip to content
Sign upPro
BillingFirst run tourMenu

First run tour (Pro)

ProIncluded in $99

Spotlight coachmarks that point at the real interface, with a cut out that glides from target to target and a tour that resumes where it was left.

ProA first visit: the cut out glides from the composer to files, the model picker and projects, then a closing step.

Installation

$ pnpm dlx shadcn@latest add @chatcn-pro/first-run-tour

Needs chatcn Pro

This command works with a Pro license, along with every Pro component.

Or start free: sign up and get three Pro components on us, with a new one every month.

Usage

tsx
import { FirstRunTour } from "@/components/ui/chatcn/pro/first-run-tour"

<FirstRunTour
  steps={[
    { target: "composer", title: "Ask anything here", body: "Enter sends." },
    { target: "model", title: "Pick the model" },
    { title: "That is everything" },
  ]}
  defaultOpen={isFirstVisit}
  storageKey="tour:v1"
>
  <App />
</FirstRunTour>

Wrap the app and mark targets with data-tour. The app dims except for a cut out around the current target, and the cut out glides to the next one rather than jumping, so the eye follows. The card sits below the target when it fits, otherwise above, and a step with no target sits in the middle. Arrow keys move through it, Escape leaves, and with storageKey a tour left halfway resumes at the same step next time. While it is open the app behind is inert, so nothing gets clicked by accident.

Examples

States

ProA step with the card above the target, one with the card below, and a centered closing step.

Props

PropTypeNotes
childrenReactNodeThe app, with data-tour targets
stepsTourStep[]{ target?, title, body? }
open, defaultOpen, onOpenChangeboolean
step, defaultStep, onStepChangenumber
onFinish, onSkip() => void, (step) => voidDone, or left at a step
storageKeystring | nullRemember the step to resume
labelsPartial<FirstRunTourLabels>Every string, for translation

Keyboard

KeyAction
Right, LeftNext, back (reversed right to left)
EscapeLeave the tour
TabMove between the card's buttons

Accessibility

  • The card is a modal dialog named by the step's title, focused on each step.
  • The app behind is inert while the tour is open.
  • The step count is text, beside a progress line.

Motion

The cut out and the card glide to the next target in 360 ms on the kit's ease out. Under reduced motion they move at once.