Skip to content

Description

Form.Element is a wrapper component for the HTML form element.

  • It ensures, users can press enter key while focusing on an input field.
  • It calls preventDefault by default.

Demos

Basic form element

Code Editor
<Form.Element onSubmit={(event) => console.log('onSubmit', event)}>
  <Card spacing="medium">
    <Field.Email />
    <Form.ButtonRow>
      <Form.SubmitButton />
    </Form.ButtonRow>
  </Card>
</Form.Element>