Onboarding
@allem-ui/onboarding
Step-by-step onboarding wizard with animated transitions, progress indicators, and spotlight product tours.
Installation
npm install @allem-ui/onboardingAdd the @source directive to your CSS so Tailwind generates the component classes:
@source "@allem-ui/onboarding";Wizard
Multi-step wizard with slide transitions. Click Next/Back to navigate.
Welcome
Let's get you set up in just a few steps.
Customize
Pick your preferences and make it yours.
You're ready!
Start exploring your new workspace.
Custom Labels
Customize button labels and add a skip option with the bar progress variant.
Connect your account
Link your GitHub account to get started.
Choose a plan
Select the plan that works for your team.
Invite your team
Add teammates to your new workspace.
Progress Variants
Three built-in styles for the progress indicator.
Dots
Bar
Numbers
OnboardingWizard Props
| Prop | Type | Default | Description |
|---|---|---|---|
| currentStep* | number | โ | Current step index |
| totalSteps* | number | โ | Total number of steps |
| onNext* | () => void | โ | Next step callback |
| onPrev* | () => void | โ | Previous step callback |
| onSkip | () => void | โ | Skip callback โ shows skip button when provided |
| isFirst* | boolean | โ | Whether on first step |
| isLast* | boolean | โ | Whether on last step |
| progressVariant | "dots" | "bar" | "numbers" | "dots" | Progress indicator style |
| nextLabel | string | "Next" | Label for the next button |
| prevLabel | string | "Back" | Label for the previous button |
| skipLabel | string | "Skip" | Label for the skip button |
| finishLabel | string | "Get Started" | Label for the finish button (last step) |
| className | string | โ | Additional CSS classes |
| children* | ReactNode | โ | OnboardingStep elements |
OnboardingStep Props
| Prop | Type | Default | Description |
|---|---|---|---|
| title | string | โ | Step title |
| description | string | โ | Step description |
| icon | ReactNode | โ | Step icon |
| className | string | โ | Additional CSS classes |
| children* | ReactNode | โ | Step content |
OnboardingProgress Props
| Prop | Type | Default | Description |
|---|---|---|---|
| currentStep* | number | โ | Current step index |
| totalSteps* | number | โ | Total number of steps |
| variant | "dots" | "bar" | "numbers" | "dots" | Progress display style |
| className | string | โ | Additional CSS classes |
useOnboarding
Hook that manages step navigation state. Spread the return value directly onto OnboardingWizard.
Options
| Prop | Type | Default | Description |
|---|---|---|---|
| totalSteps* | number | โ | Total number of steps |
| initialStep | number | 0 | Starting step index |
| onComplete | () => void | โ | Called when the user completes all steps |
| onSkip | () => void | โ | Called when the user skips |
Return Value
| Prop | Type | Default | Description |
|---|---|---|---|
| currentStep | number | โ | Current step index |
| totalSteps | number | โ | Total number of steps |
| isFirst | boolean | โ | Whether on the first step |
| isLast | boolean | โ | Whether on the last step |
| isComplete | boolean | โ | Whether onboarding is complete |
| next | () => void | โ | Go to the next step |
| prev | () => void | โ | Go to the previous step |
| goTo | (step: number) => void | โ | Jump to a specific step |
| skip | () => void | โ | Skip the onboarding |
| reset | () => void | โ | Reset to the initial step |
Spotlight Tour
Use SpotlightTour + useTour to create guided tours that highlight DOM elements with a spotlight overlay.
SpotlightTour Props
| Prop | Type | Default | Description |
|---|---|---|---|
| isActive* | boolean | โ | Whether the tour is running |
| step* | TourStep | null | โ | Current tour step |
| targetRect* | TargetRect | null | โ | Bounding rect of the target element |
| currentStep* | number | โ | Current step index |
| totalSteps* | number | โ | Total number of steps |
| isFirst* | boolean | โ | Whether on first step |
| isLast* | boolean | โ | Whether on last step |
| onNext* | () => void | โ | Next step callback |
| onPrev* | () => void | โ | Previous step callback |
| onSkip* | () => void | โ | Skip tour callback |
| padding | number | 8 | Padding around the spotlight target |
| className | string | โ | Additional CSS classes |
SpotlightStep Props
Declarative step component โ use as children of SpotlightTour or pass steps directly to useTour.
| Prop | Type | Default | Description |
|---|---|---|---|
| target* | string | โ | CSS selector for the target element |
| title* | string | โ | Step title |
| content* | string | โ | Step description |
| placement | "top" | "bottom" | "left" | "right" | โ | Tooltip placement relative to target |
useTour Options
| Prop | Type | Default | Description |
|---|---|---|---|
| steps* | TourStep[] | โ | Array of tour steps |
| onComplete | () => void | โ | Called when tour finishes |
| onSkip | () => void | โ | Called when user skips the tour |
useTour Return Value
| Prop | Type | Default | Description |
|---|---|---|---|
| isActive | boolean | โ | Whether the tour is currently running |
| currentStep | number | โ | Current step index |
| totalSteps | number | โ | Total number of steps |
| step | TourStep | null | โ | Current step object |
| targetRect | TargetRect | null | โ | Bounding rect of target element |
| isFirst | boolean | โ | Whether on the first step |
| isLast | boolean | โ | Whether on the last step |
| start | () => void | โ | Start the tour |
| stop | () => void | โ | Stop the tour without triggering onComplete |
| next | () => void | โ | Go to the next step |
| prev | () => void | โ | Go to the previous step |
| skip | () => void | โ | Skip the tour (triggers onSkip) |
TourStep Type
| Prop | Type | Default | Description |
|---|---|---|---|
| target* | string | โ | CSS selector for the target element |
| title* | string | โ | Step title |
| content* | string | โ | Step description |
| placement | "top" | "bottom" | "left" | "right" | โ | Tooltip placement relative to target |
Tour Built-in Behavior
| Feature | Description |
|---|---|
| Keyboard navigation | โ next step, โ previous step, Esc to skip the tour. |
| Auto-scroll | Target elements are smoothly scrolled into view on each step. |
| Resize tracking | Spotlight position updates on window resize and scroll via ResizeObserver. |
| Spotlight overlay | Full-screen overlay with a cutout around the target element using box-shadow. |