Multi-Step Form Wrapper

A comprehensive multi-step form wrapper component that breaks complex forms into manageable steps with advanced features like auto-save, validation, and animations.

Installation

Install the Multi-Step Form Wrapper component using your preferred package manager.

npxshadcn@latest addhttps://rigidui.com/registry/multi-step-form-wrapper

Usage

The Multi-Step Form Wrapper component simplifies the creation of step-by-step forms with validation and progress tracking.

Live Preview
1

Basic Info

Discover Its Features

The Multi-Step Form Wrapper component is packed with powerful features designed to provide an exceptional user experience.

Step-by-Step Form Flow

Guide users through complex forms with a clear step-by-step interface and visual progress tracking.

Advanced Validation

Comprehensive step-by-step validation with Zod schemas, custom error messages, and validation error callbacks.

Auto-Save & Persistence

Automatically save form progress to localStorage with configurable debouncing and persistent form state.

Smooth Animations

Beautiful step transitions with configurable animation duration and seamless user experience.

Flexible Configuration

Highly customizable with step lifecycle hooks, optional steps, progress bars, and accessibility features.

API Reference

PropTypeDefaultDescription
childrenReact.ReactNode-Step components to render within the form
onComplete(data: FormData) => voidundefinedCallback function called when the form is completed
initialDataRecord<string, unknown>{}Initial data for the form
schemaZodSchemaundefinedZod schema for overall form validation
classNamestring''Additional class names for styling
showStepIndicatorbooleantrueWhether to show the step indicator
showStepTitlebooleantrueWhether to show the step title and description
showProgressBarbooleanfalseWhether to show progress bar with percentage
allowSkipStepsbooleanfalseWhether to allow skipping to other steps
navigationPosition'bottom' | 'top''bottom'Position of the navigation buttons
nextButtonTextstring"Next"Text for the next button
prevButtonTextstring"Back"Text for the previous button
completeButtonTextstring"Complete"Text for the complete button
allowStepResetbooleanfalseWhether to show a reset button to go back to first step
onStepChange(prevStep: number, nextStep: number) => voidundefinedCallback function called when the step changes
onStepValidationError(step: number, errors: FieldErrors) => voidundefinedCallback function called when step validation fails
persistKeystringundefinedKey for localStorage persistence of form data
autoSavebooleanfalseWhether to automatically save form data to localStorage
autoSaveDelaynumber1000Delay in milliseconds for auto-save debouncing
animateStepChangebooleantrueWhether to animate step transitions
transitionDurationnumber300Duration of step transition animations in milliseconds

Advanced Usage

Explore different configurations and use cases for the Multi-Step Form Wrapper component.

Basic Multi-Step Form

A simple two-step form with validation and progress tracking.

Live Preview
1

Basic Info

Form with Progress Bar

Multi-step form with a progress bar and custom navigation positioning.

Live Preview
1
Progress50%

Personal Info

Form with Step Skipping

Allow users to skip between steps and reset the form.

Live Preview
1
Progress50%

Personal

Form with Auto-Save

Automatically save form data to localStorage with custom validation messages.

Live Preview
1

Personal Info

Complete Registration Form

A comprehensive example with all features enabled.

Live Preview
1
Progress25%

Personal Information