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*numberCurrent step index
totalSteps*numberTotal number of steps
onNext*() => voidNext step callback
onPrev*() => voidPrevious step callback
onSkip() => voidSkip callback — shows skip button when provided
isFirst*booleanWhether on first step
isLast*booleanWhether 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)
classNamestringAdditional CSS classes
children*ReactNodeOnboardingStep elements

OnboardingStep Props

PropTypeDefaultDescription
titlestringStep title
descriptionstringStep description
iconReactNodeStep icon
classNamestringAdditional CSS classes
children*ReactNodeStep content

OnboardingProgress Props

PropTypeDefaultDescription
currentStep*numberCurrent step index
totalSteps*numberTotal number of steps
variant"dots" | "bar" | "numbers""dots"Progress display style
classNamestringAdditional CSS classes

useOnboarding

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

Options

PropTypeDefaultDescription
totalSteps*numberTotal number of steps
initialStepnumber0Starting step index
onComplete() => voidCalled when the user completes all steps
onSkip() => voidCalled when the user skips

Return Value

PropTypeDefaultDescription
currentStepnumberCurrent step index
totalStepsnumberTotal number of steps
isFirstbooleanWhether on the first step
isLastbooleanWhether on the last step
isCompletebooleanWhether onboarding is complete
next() => voidGo to the next step
prev() => voidGo to the previous step
goTo(step: number) => voidJump to a specific step
skip() => voidSkip the onboarding
reset() => voidReset 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*booleanWhether the tour is running
step*TourStep | nullCurrent tour step
targetRect*TargetRect | nullBounding rect of the target element
currentStep*numberCurrent step index
totalSteps*numberTotal number of steps
isFirst*booleanWhether on first step
isLast*booleanWhether on last step
onNext*() => voidNext step callback
onPrev*() => voidPrevious step callback
onSkip*() => voidSkip tour callback
paddingnumber8Padding around the spotlight target
classNamestringAdditional CSS classes

SpotlightStep Props

Declarative step component — use as children of SpotlightTour or pass steps directly to useTour.

PropTypeDefaultDescription
target*stringCSS selector for the target element
title*stringStep title
content*stringStep description
placement"top" | "bottom" | "left" | "right"Tooltip placement relative to target

useTour Options

PropTypeDefaultDescription
steps*TourStep[]Array of tour steps
onComplete() => voidCalled when tour finishes
onSkip() => voidCalled when user skips the tour

useTour Return Value

PropTypeDefaultDescription
isActivebooleanWhether the tour is currently running
currentStepnumberCurrent step index
totalStepsnumberTotal number of steps
stepTourStep | nullCurrent step object
targetRectTargetRect | nullBounding rect of target element
isFirstbooleanWhether on the first step
isLastbooleanWhether on the last step
start() => voidStart the tour
stop() => voidStop the tour without triggering onComplete
next() => voidGo to the next step
prev() => voidGo to the previous step
skip() => voidSkip the tour (triggers onSkip)

TourStep Type

PropTypeDefaultDescription
target*stringCSS selector for the target element
title*stringStep title
content*stringStep 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.