Advanced Form
A comprehensive, configuration-driven form component with built-in validation, multi-step support, and 16+ field types.
Install Dependencies
npx quickcode-ui add AdvancedFormExamples
Comprehensive Multi-Step Form
Complete Advanced Form
Job Application Form
Job Application Form
User Profile Form
Profile Form with Image Support
API Reference
AdvancedForm (Root)
| Prop | Type | Default | Description |
|---|---|---|---|
children | React.ReactNode | — | Form components |
onSubmit | (data: Record<string, any>) => void | Required | Called when form is submitted |
onChange | (data: Record<string, any>) => void | undefined | Called when any field value changes |
initialValues | Record<string, any> | {} | Initial form values |
autoSave | boolean | false | Enable localStorage auto-save |
autoSaveKey | string | undefined | Custom localStorage key |
loading | boolean | false | Disable all inputs |
isFormLoading | boolean | false | Show skeleton loader |
skeletonProps | FormSkeletonProps | undefined | Skeleton configuration |
className | string | undefined | Additional CSS classes |
AdvancedForm.Header
| Prop | Type | Default | Description |
|---|---|---|---|
title | string | undefined | Header title |
description | string | undefined | Header description |
logo | string | undefined | Logo image URL |
logoClassName | string | undefined | Logo CSS classes |
className | string | undefined | Additional CSS classes |
children | React.ReactNode | undefined | Custom header content |
AdvancedForm.StepperProgress
| Prop | Type | Default | Description |
|---|---|---|---|
size | "sm" | "md" | "lg" | "md" | Stepper size |
showLabels | boolean | true | Show step labels |
className | string | undefined | Additional CSS classes |
AdvancedForm.Step
| Prop | Type | Default | Description |
|---|---|---|---|
id | string | Required | Unique step identifier |
title | string | Required | Step title |
description | string | undefined | Step description |
className | string | undefined | Additional CSS classes |
children | React.ReactNode | — | Step content |
AdvancedForm.Group
| Prop | Type | Default | Description |
|---|---|---|---|
className | string | undefined | Additional CSS classes |
children | React.ReactNode | — | Group content |
AdvancedForm.Field
| Prop | Type | Default | Description |
|---|---|---|---|
id | string | Required | Field identifier |
validation | FormFieldValidation | undefined | Validation rules |
defaultValue | any | undefined | Default field value |
conditional | (values: Record<string, any>) => boolean | undefined | Show/hide field conditionally |
className | string | undefined | Additional CSS classes |
children | React.ReactNode | — | Field content |
AdvancedForm.Label
| Prop | Type | Default | Description |
|---|---|---|---|
required | boolean | false | Show required asterisk |
className | string | undefined | Additional CSS classes |
children | React.ReactNode | — | Label text |
AdvancedForm.Description
| Prop | Type | Default | Description |
|---|---|---|---|
className | string | undefined | Additional CSS classes |
children | React.ReactNode | — | Description text |
AdvancedForm.Error
| Prop | Type | Default | Description |
|---|---|---|---|
className | string | undefined | Additional CSS classes |
AdvancedForm.Input
| Prop | Type | Default | Description |
|---|---|---|---|
type | string | "text" | Input type |
placeholder | string | undefined | Placeholder text |
onChange | (e: ChangeEvent<HTMLInputElement>) => void | undefined | Change handler |
className | string | undefined | Additional CSS classes |
| …props | InputHTMLAttributes | — | All input props supported |
AdvancedForm.Textarea
| Prop | Type | Default | Description |
|---|---|---|---|
placeholder | string | undefined | Placeholder text |
onChange | (e: ChangeEvent<HTMLTextAreaElement>) => void | undefined | Change handler |
className | string | undefined | Additional CSS classes |
| …props | TextareaHTMLAttributes | — | All textarea props |
AdvancedForm.PasswordInput
| Prop | Type | Default | Description |
|---|---|---|---|
placeholder | string | undefined | Placeholder text |
onChange | (e: ChangeEvent<HTMLInputElement>) => void | undefined | Change handler |
className | string | undefined | Additional CSS classes |
| …props | InputHTMLAttributes | — | All input props supported |
AdvancedForm.Checkbox
| Prop | Type | Default | Description |
|---|---|---|---|
className | string | undefined | Additional CSS classes |
children | React.ReactNode | undefined | Checkbox label |
| …props | CheckboxProps | — | All checkbox props |
AdvancedForm.Switch
| Prop | Type | Default | Description |
|---|---|---|---|
className | string | undefined | Additional CSS classes |
children | React.ReactNode | undefined | Switch label |
| …props | SwitchProps | — | All switch props |
AdvancedForm.RadioGroup
| Prop | Type | Default | Description |
|---|---|---|---|
className | string | undefined | Additional CSS classes |
children | React.ReactNode | — | RadioGroup.Item children |
AdvancedForm.RadioGroup.Item
| Prop | Type | Default | Description |
|---|---|---|---|
value | string | Required | Radio item value |
id | string | Required | Radio item id |
label | string | Required | Radio item label |
AdvancedForm.Select
| Prop | Type | Default | Description |
|---|---|---|---|
placeholder | string | undefined | Placeholder text |
className | string | undefined | Additional CSS classes |
children | React.ReactNode | — | SelectItem children |
AdvancedForm.Select.Item
| Prop | Type | Default | Description |
|---|---|---|---|
value | string | Required | Select item value |
disabled | boolean | false | Disable option |
children | string | Required | Select item label |
AdvancedForm.MultiSelect
| Prop | Type | Default | Description |
|---|---|---|---|
placeholder | string | undefined | Placeholder text |
className | string | undefined | Additional CSS classes |
children | React.ReactNode | — | MultiSelectItem children |
AdvancedForm.MultiSelect.Item
| Prop | Type | Default | Description |
|---|---|---|---|
value | string | Required | Multi-select item value |
disabled | boolean | false | Disable option |
children | string | Required | Multi-select item label |
AdvancedForm.Slider
| Prop | Type | Default | Description |
|---|---|---|---|
min | number | 0 | Minimum value |
max | number | 100 | Maximum value |
step | number | 1 | Step increment |
showValue | boolean | true | Display current value |
className | string | undefined | Additional CSS classes |
AdvancedForm.RangeSlider
| Prop | Type | Default | Description |
|---|---|---|---|
min | number | 0 | Minimum value |
max | number | 100 | Maximum value |
step | number | 1 | Step increment |
showValue | boolean | true | Display range values |
className | string | undefined | Additional CSS classes |
AdvancedForm.CheckboxGroup
| Prop | Type | Default | Description |
|---|---|---|---|
className | string | undefined | Additional CSS classes |
children | React.ReactNode | — | CheckboxGroup.Item children |
AdvancedForm.CheckboxGroup.Item
| Prop | Type | Default | Description |
|---|---|---|---|
value | string | Required | Checkbox item value |
label | string | Required | Checkbox item label |
disabled | boolean | false | Disable option |
AdvancedForm.MultiInput
| Prop | Type | Default | Description |
|---|---|---|---|
placeholder | string | undefined | Placeholder text |
max | number | undefined | Maximum number of items |
className | string | undefined | Additional CSS classes |
AdvancedForm.DatePicker
| Prop | Type | Default | Description |
|---|---|---|---|
placeholder | string | undefined | Placeholder text |
includeTime | boolean | false | Include time picker |
minDate | Date | undefined | Minimum selectable date |
maxDate | Date | undefined | Maximum selectable date |
className | string | undefined | Additional CSS classes |
AdvancedForm.DateRangePicker
| Prop | Type | Default | Description |
|---|---|---|---|
placeholder | string | undefined | Placeholder text |
minDate | Date | undefined | Minimum selectable date |
maxDate | Date | undefined | Maximum selectable date |
className | string | undefined | Additional CSS classes |
AdvancedForm.FileInput
| Prop | Type | Default | Description |
|---|---|---|---|
onChange | (e: ChangeEvent<HTMLInputElement>) => void | undefined | Change handler |
className | string | undefined | Additional CSS classes |
| …props | InputHTMLAttributes | — | All input props supported |
AdvancedForm.ImageInput
| Prop | Type | Default | Description |
|---|---|---|---|
previewUrl | string | undefined | Default preview image URL |
onChange | (e: ChangeEvent<HTMLInputElement>) => void | undefined | Change handler |
className | string | undefined | Additional CSS classes |
| …props | InputHTMLAttributes | — | All input props supported |
AdvancedForm.Actions
| Prop | Type | Default | Description |
|---|---|---|---|
className | string | undefined | Additional CSS classes |
children | React.ReactNode | — | Action buttons |
AdvancedForm.BackButton
| Prop | Type | Default | Description |
|---|---|---|---|
className | string | undefined | Additional CSS classes |
children | React.ReactNode | "Back" | Button text |
AdvancedForm.NextButton
| Prop | Type | Default | Description |
|---|---|---|---|
className | string | undefined | Additional CSS classes |
children | React.ReactNode | "Next" | Button text |
AdvancedForm.SubmitButton
| Prop | Type | Default | Description |
|---|---|---|---|
isLoading | boolean | false | Show loading state |
className | string | undefined | Additional CSS classes |
children | React.ReactNode | "Submit" | Button text |
AdvancedForm.ResetButton
| Prop | Type | Default | Description |
|---|---|---|---|
className | string | undefined | Additional CSS classes |
children | React.ReactNode | "Reset" | Button text |
AdvancedForm.Form
| Prop | Type | Default | Description |
|---|---|---|---|
onSubmit | (data: Record<string, any>) => void | Required | Form submit handler |
className | string | undefined | Additional CSS classes |
children | React.ReactNode | — | Form content |
AdvancedForm.Footer
| Prop | Type | Default | Description |
|---|---|---|---|
className | string | undefined | Additional CSS classes |
children | React.ReactNode | — | Footer content |
FormFieldValidation
| Property | Type | Default | Description |
|---|---|---|---|
required | boolean | false | Field is required |
minLength | number | undefined | Minimum string length |
maxLength | number | undefined | Maximum string length |
min | number | undefined | Minimum numeric value |
max | number | undefined | Maximum numeric value |
pattern | RegExp | undefined | Regex validation pattern |
override | boolean | false | Override default type validation |
custom | (value: any) => string | null | undefined | Custom validation function |
requiredError | string | undefined | Custom required error message |
minLengthError | string | undefined | Custom min length error message |
maxLengthError | string | undefined | Custom max length error message |
minError | string | undefined | Custom min value error message |
maxError | string | undefined | Custom max value error message |
patternError | string | undefined | Custom pattern error message |
emailError | string | undefined | Custom email error message |
urlError | string | undefined | Custom URL error message |
telError | string | undefined | Custom phone error message |
passwordError | string | undefined | Custom password error message |
customFileError | string | undefined | Custom file error message |
maxSize | number | undefined | Max file size in bytes |
acceptedTypes | string[] | undefined | Accepted file types |
Last updated on