Skip to main content
Version: 1.0.3

Multi-Step Form

A comprehensive multi-step form wizard that guides users through complex data collection processes. Features include step-by-step navigation, field validation, progress tracking, review screen, and multiple visual themes. Perfect for onboarding flows, registration processes, checkout forms, and any multi-stage data collection.

Onboarding Form

1
2
3
4

Personal Information

Tell us a bit about yourself

Step 1 of 3

Installation

ignix add component multistepform

Examples

Basic Usage

import { MultiStepForm } from '@ignix-ui/multi-step-form';

const steps = [
{
id: 'step1',
title: 'Personal Info',
fields: [
{ id: 'name', name: 'name', label: 'Name', type: 'text', required: true }
]
}
];

export default function MyForm() {
return (
<MultiStepForm steps={steps} onSubmit={(data) => console.log(data)}>
<MultiStepForm.Header title="Registration" />
<MultiStepForm.StepIndicator />
<MultiStepForm.Content />
<MultiStepForm.Navigation />
</MultiStepForm>
);
}

Features

  • Multi-Step Navigation: Intuitive step progression.
  • Field Validation: Built-in and custom validation.
  • Step Validation: Custom logic per step.
  • Progress Tracking: Visual completion status.
  • Review Screen: Pre-submission summary.
  • Multiple Field Types: Comprehensive input support.
  • Compound Components: Flexible composition.
  • Responsive Design: Mobile-ready layout.
  • Accessibility: ARIA and keyboard support.
  • Animations: 5 transition variants.
  • Theme Support: 5 visual variants.
  • Input Variants: Multiple styling options.
  • Button Variants: Animated navigation buttons.
  • State Management: Built-in error handling.
  • Notifications: Success and error toasts.
  • Loading States: Built-in spinners.
  • Initial Data: Form pre-population.
  • Customizable Labels: Flexible text options.
  • TypeScript Support: Comprehensive typing.

Props

MultiStepForm Props

PropTypeDefaultDescription
stepsFormStep[]RequiredStep configurations.
initialDataFormData{}Initial data.
onSubmit(data: FormData) => Promise<void> | void-Submission callback.
onStepChange(step: number, data: FormData) => void-Step change callback.
onCancel() => void-Cancel callback.
variant"default" | "gradient" | "card" | "glass" | "dark"'default'Theme variant.
animationVariant"fadeUp" | "scaleIn" | "slideUp" | "slideLeft" | "slideRight"'fadeUp'Transition animation.
inputVariantstring'clean'Input styling.
buttonVariantstring'default'Button styling.
buttonAnimationVariantstring-Button animation.
backButtonLabelstring'← Back'Back button label.
nextButtonLabelstring'Next →'Next button label.
submitButtonLabelstring'Submit'Submit button label.
cancelButtonLabelstring'Cancel'Cancel button label.
reviewStepTitlestring'Review'Review step title.
isLoadingbooleanfalseLoading state.
isSubmittingbooleanfalseSubmitting state.
showReviewStepbooleantrueShow review step.
showCancelButtonbooleantrueShow cancel button.
showSuccessNotificationbooleantrueShow success toast.
successNotificationDurationnumber3000Toast duration.
successNotificationMessagestring'Form submitted successfully!'Toast message.
darkModebooleanfalseEnable dark mode.

MultiStepHeader Props

PropTypeDefaultDescription
titlestring | React.ReactNode'Multi-Step Form'Header title.
iconReact.ReactNode<Zap />Header icon.
childrenReact.ReactNode-Custom content.
classNamestring-Header class.
titleClassNamestring-Title class.
iconClassNamestring-Icon class.
containerClassNamestring-Container class.
titleVariant'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'body-large' | 'body' | 'body-small' | 'lead' | 'large' | 'small' | 'label' | 'caption' | 'muted' | 'link' | 'code' | 'blockquote' | 'list''h6'Title typography.
titleWeight'light' | 'normal' | 'medium' | 'semibold' | 'bold''semibold'Title weight.
titleColor'default' | 'primary' | 'secondary' | 'muted' | 'error' | 'success' | 'warning' | 'inherit''default'Title color.
iconSizenumber16Icon size.

MultiStepStepIndicator Props

PropTypeDefaultDescription
variant`'default''pills''tabs'`
completedColorstring'bg-green-900 dark:bg-green-600'Completed color.
completedTextColorstring'text-green-900 dark:text-green-600'Completed text color.
classNamestring-Indicator class.

MultiStepContent Props

PropTypeDefaultDescription
childrenReact.ReactNode-Step content.
classNamestring-Content class.

MultiStepField Props

PropTypeDefaultDescription
fieldFormFieldRequiredField config.
classNamestring-Field class.

MultiStepReview Props

PropTypeDefaultDescription
onEditStep(step: number) => void-Edit callback.
childrenReact.ReactNode-Custom review.
classNamestring-Review class.

MultiStepNavigation Props

PropTypeDefaultDescription
backButtonLabelstring'← Back'Back label.
nextButtonLabelstring'Next →'Next label.
submitButtonLabelstring'Submit'Submit label.
cancelButtonLabelstring'Cancel'Cancel label.
showCancelButtonbooleantrueShow cancel.
onCancel() => void-Cancel callback.
classNamestring-Navigation class.

MultiStepNotification Props

PropTypeDefaultDescription
type'success' | 'error' | 'info' | 'warning'RequiredNotification type.
messagestringRequiredNotification message.
onClose() => voidRequiredClose callback.
durationnumber3000Auto-close delay.
classNamestring-Notification class.