StepForm

Create multi-step React forms with just a few lines of code.

Props

PropTypeDefaultDescription
onSubmitrequiredSubmitHandler<TFieldValues>The submit handler.
childrenstring | number | bigint | boolean | ReactElement<any, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal | Promise<...> | ((props: StepFormRenderContext<...>) => ReactNode)
contextTContext
criteriaModeCriteriaMode
defaultValuestype ONLY_FOR_FORMAT = | AsyncDefaultValues<TFieldValues> | DefaultValues<TFieldValues>
delayErrornumber
disabledboolean
errorsFieldErrors<TFieldValues>
fieldResolverFieldResolverThe field resolver, used to resolve the fields from schemas.
fieldsDefaultFieldOverridesField overrides
formReftype ONLY_FOR_FORMAT = | (( instance: UseFormReturn<TFieldValues, TContext> | null, ) => void | (() => VoidOrUndefinedOnly)) | RefObject<UseFormReturn<TFieldValues, TContext>>The Hook Form state ref.
isCompletedboolean
mode"onChange" | "onBlur" | "onSubmit" | "all" | "onTouched"
onChangeWatchObserver<TFieldValues>Triggers when any of the field change.
onErrorSubmitErrorHandler<TFieldValues>Triggers when there are validation errors.
progressiveboolean
resetOptionsPartial<{ keepDirtyValues: boolean keepErrors: boolean keepDirty: boolean keepValues: boolean keepDefaultValues: boolean keepIsSubmitted: boolean keepIsSubmitSuccessful: boolean keepTouched: boolean keepIsValidating: boolean keepIsValid: boolean keepSubmitCount: boolean }>
resolverResolver<TFieldValues, TContext>
reValidateMode"onChange" | "onBlur" | "onSubmit"
schemaanyThe form schema.
shouldFocusErrorboolean
shouldUnregisterboolean
shouldUseNativeValidationboolean
stepstring | number
stepsTSteps
valuesTFieldValues

Was this helpful?