Multi-Step Onboarding
A comprehensive, multi-step onboarding wizard component with form validation, progress tracking, and seamless Next.js server actions integration.
Multi-Step Onboarding Wizard
A powerful, accessible multi-step onboarding wizard that guides users through profile completion with real-time validation, progress indicators, and seamless Next.js server actions integration. Perfect for user registration, profile setup, and data collection workflows.

Installation
Install the component using the AxionsJS CLI:
Configure your environment variables in .env
:
Set up Prisma schema and push to database:
The component includes complete database models for user profiles, form validation schemas, and server actions. All forms are pre-configured with accessibility features and responsive design.
Database Schema
Add the following model to your schema.prisma
file:
Run npx prisma db push
after adding the schema to apply changes to your database.
Usage
Import and use the OnboardingWizard component:
Key Features
Multi-Step Flow
4-step guided process with validation and progress tracking
Form Validation
Real-time validation with Zod schemas and React Hook Form
Avatar Upload
Built-in avatar upload with preview and file handling
Progress Indicators
Visual progress bar and step indicators for better UX
Server Actions
Seamless Next.js server actions integration for data persistence
Accessibility
Full keyboard navigation and screen reader support
Component Props
Prop | Type | Default |
---|---|---|
redirectUrl | string | "/dashboard" |
className | string | "" |
initialStep | number | 1 |
showStepIndicator | boolean | true |
submitButtonLabel | string | "Complete Setup" |
onComplete | (data: OnboardingFormValues) => void | undefined |
Form Steps
The onboarding wizard consists of 4 comprehensive steps:
Step 1: Personal Information
- Name (required, minimum 2 characters)
- Bio (optional, maximum 500 characters)
- Real-time validation with helpful error messages
Server Actions
The component utilizes Next.js server actions for secure data persistence:
Server Action Features:
- Type-safe data handling with TypeScript
- Upsert operations for flexible data management
- Automatic path revalidation for fresh data
- Comprehensive error handling and logging
- Structured JSON preferences storage
Form Validation
The wizard uses Zod for comprehensive form validation:
Validation Features:
- Step-by-step validation prevents invalid progression
- Real-time error messages with helpful guidance
- Optional fields with smart defaults
- Type-safe form data throughout the application
Accessibility Features
The Multi-Step Onboarding Wizard is built with accessibility in mind:
- Keyboard Navigation: Full keyboard support with proper focus management
- Screen Reader Support: ARIA labels, roles, and live regions
- Progress Indicators: Clear step progression for assistive technologies
- Form Validation: Accessible error messages and field descriptions
- Focus Management: Automatic focus movement between steps
- Skip Functionality: Optional steps can be skipped for better UX
The component follows WCAG 2.1 AA guidelines and has been tested with popular screen readers.
Conclusion
The Multi-Step Onboarding Wizard provides a complete, production-ready solution for user onboarding in Next.js applications. With its comprehensive form validation, accessibility features, and seamless server actions integration, it delivers an excellent user experience while maintaining robust data handling and security.