Onboarding

@allem-ui/onboarding

Step-by-step onboarding wizard with animated transitions, progress indicators, and spotlight product tours.

Installation

npm install @allem-ui/onboarding

Add 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.

๐Ÿ‘ฅ
Step 1 of 333%

Progress Variants

Three built-in styles for the progress indicator.

Dots

Bar

Step 3 of 560%

Numbers

3
4

OnboardingWizard Props

PropTypeDefaultDescription
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
nextLabelstring"Next"Label for the next button
prevLabelstring"Back"Label for the previous button
skipLabelstring"Skip"Label for the skip button
finishLabelstring"Get Started"Label for the finish button (last step)
classNamestringโ€”Additional CSS classes
children*ReactNodeโ€”OnboardingStep elements

OnboardingStep Props

PropTypeDefaultDescription
titlestringโ€”Step title
descriptionstringโ€”Step description
iconReactNodeโ€”Step icon
classNamestringโ€”Additional CSS classes
children*ReactNodeโ€”Step content

OnboardingProgress Props

PropTypeDefaultDescription
currentStep*numberโ€”Current step index
totalSteps*numberโ€”Total number of steps
variant"dots" | "bar" | "numbers""dots"Progress display style
classNamestringโ€”Additional CSS classes

useOnboarding

Hook that manages step navigation state. Spread the return value directly onto OnboardingWizard.

Options

PropTypeDefaultDescription
totalSteps*numberโ€”Total number of steps
initialStepnumber0Starting step index
onComplete() => voidโ€”Called when the user completes all steps
onSkip() => voidโ€”Called when the user skips

Return Value

PropTypeDefaultDescription
currentStepnumberโ€”Current step index
totalStepsnumberโ€”Total number of steps
isFirstbooleanโ€”Whether on the first step
isLastbooleanโ€”Whether on the last step
isCompletebooleanโ€”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.

Spotlight Tour requires live DOM targets โ€” see the code example for usage.

SpotlightTour Props

PropTypeDefaultDescription
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
paddingnumber8Padding around the spotlight target
classNamestringโ€”Additional CSS classes

SpotlightStep Props

Declarative step component โ€” use as children of SpotlightTour or pass steps directly to useTour.

PropTypeDefaultDescription
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

PropTypeDefaultDescription
steps*TourStep[]โ€”Array of tour steps
onComplete() => voidโ€”Called when tour finishes
onSkip() => voidโ€”Called when user skips the tour

useTour Return Value

PropTypeDefaultDescription
isActivebooleanโ€”Whether the tour is currently running
currentStepnumberโ€”Current step index
totalStepsnumberโ€”Total number of steps
stepTourStep | nullโ€”Current step object
targetRectTargetRect | nullโ€”Bounding rect of target element
isFirstbooleanโ€”Whether on the first step
isLastbooleanโ€”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

PropTypeDefaultDescription
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

FeatureDescription
Keyboard navigationโ†’ next step, โ† previous step, Esc to skip the tour.
Auto-scrollTarget elements are smoothly scrolled into view on each step.
Resize trackingSpotlight position updates on window resize and scroll via ResizeObserver.
Spotlight overlayFull-screen overlay with a cutout around the target element using box-shadow.