Skip to main content
Brand and assets
Build
Monitor and contribute
/
Component library
  • All components
  • Buttons & actions
  • Forms & inputs
    • Checkbox
    • ChoiceGroup
    • CurrencyInput
    • DateInput
    • FileInputZone
    • Filters
    • Form
    • MaskedTextInput
    • PasswordInput
    • Pill
    • Pill
    • Radio
    • SearchInput
    • SegmentedSlider
    • Select
    • Switch
    • TextArea
    • TextInput
  • Layout & containers
  • Overlays
  • Feedback & status
  • Data display
  • Typography
  • Accessibility
  • Contrib
  • Deprecated
  • Forms & inputs
  • Form

Form

Wires a web form together: initial values, validation and submission. Use its wrapped fields, such as `Form.TextInput`, rather than the plain ones.

Health
Component health
Source
View on Github
Playground
No Example
Accessibility
unknown
Platform
Web
  • Overview
  • Props

On th web, when you need a complex form to manage data with initial values, validation, etc., the Form component can be used with its wrapped components to make the experience seamless.

👉 Check the guide to know when to use it or not

Basic usage​

Available wrapped components​

💡 If one is missing, do not hesitate to ping @murray_owners

  • <Form.TextInput>
  • <Form.Checkbox>
  • <Form.CheckboxGroup>
  • <Form.RadioGroup>
  • <Form.TextArea>
  • <Form.PasswordInput>
  • <Form.Switch>
  • <Form.SwitchGroup>
  • <Form.Select>

Form props

NameTypeDefault ValueDescriptionUsage count
classNamestring
idstring
onChange(values: Values) => Promise<any>void
onSubmit*
2 possibilities(values: Values, actions: FormActions<Values>) => Promise<any>void
warningSchemaany | (() => any)

Undocumented props

NameTypeDefault ValueDescriptionUsage count
cssany
enableReinitializeany
initialErrorsany
initialTouchedany
initialValuesany
innerRefany
onResetany
validateany
validateOnBlurany
validateOnChangeany
validateOnMountany
validationSchemaany
Edit this page
Previous
Filters
Next
MaskedTextInput
  • Basic usage
  • Available wrapped components