Form

Updated:

A simple utility for common form-related workflows.

Currently, the <q2-form> component's primary feature is to provide recommended spacing options between form fields. We fully expect to add more features over time.

Easily Remove Vertical Spacing

If you're trying to implement a layout that does not benefit from any form field spacing, removing it is quite easy! All you have to do is wrap your form fields in a <q2-form> component, setting the spacing to "none" like so:

<q2-form spacing="none">
  <q2-input label="First name"></q2-input>
  <q2-input label="Last name"></q2-input>
</q2-form>

Properties

Learn more about properties.

spacing

Changes the vertical spacing of the form-fields contained within the component's slot

The following CSS variables are available to override the default theme styles of the q2-formcomponent.

There is 1 frequently asked question related to this page.