Form Field

Interactive elements for inputting or selecting data.

A form field is the fundamental element of a form. It combines an input, its label, and helper text if needed.
An input can be anything from a text field to checkboxes or sliders.

The Form Field anatomy.

The Form Field anatomy.

Anatomy


  1. Label: Represents a caption for an input in a form; you can learn more about them in our label documentation.
  2. Input: An element where the user can input data; there are exceptional cases where you can stack more than one input (e.g., checkboxes, radio buttons).
  3. Helper text(optional): A small paragraph that gives the user helpful context about the data they need to provide. We recommend not exceeding three lines of text for it. If you need more, we recommend adding a link that might open a modal or a Side Panel.
  4. Error text: A simple message notifying the user that the data they added to the input was incorrect. It should be simple and straight to the point.

 

Styling


Spacing

Vertical Stacking

The gap between form controls in a single Fieldset or Section should be 16px form_control/form_body/gap.

Form field gaps.

Form field gaps.

Horizontal Stacking

The gap between horizontally stacked form controls should be form_control/form_body/gap as well.

Stacking form fields horizontally.

Stacking form fields horizontally.

Grouped Inputs (Checkbox & Radio button Groups)

If you have a Radio Button or Checkbox Group that requires more than one input, the gap between them should be 8px forms/form_control/grouped_inputs/gap.

Grouped input gaps.

Grouped input gaps.

Color & Text Styles

The color and text styles are on each Form Field’s documentation page.