Maturity
FYQ2 target
Overview
The Fields wrap any Form Control and provide context via the Label, the Helper Text, and other metadata. It’s the preferred way of using forms as they are more usable and accessible out of the box—unlike bare-bones Controls.
Types
There are different types of Field components depending on their purpose. Each has different properties and uses. Here is a summary:
|
Name |
When to use |
Preview |
|---|---|---|
|
A control that allows people to make single or multiple selections. |
|
|
|
A selection tool to make clear, concise choices from a list of options. |
|
|
|
A control that enables people to select one option from multiple presented. |
|
|
|
Allow people to enter multiple lines of text. |
|
|
|
A single-line text field. Line breaks are automatically removed from the input value. |
|
Anatomy
All the elements that wrap the control are considered part of a Field.
Properties
|
Name |
Values |
Default |
|---|---|---|
|
Label |
String |
- |
|
Required Signifies that input values is required by the control |
Boolean |
false |
|
Helper text Provides additional meaning to the control and helps with the usage |
Boolean |
false |
|
Max length Limits the amount of character control can hold |
Boolean |
false |
How to use
Label
A label is a short text—typically one to three-word long—that helps people immediately understand what data they need to introduce.
Related content:
Required
Input values can be optional or required in form controls. When it’s required, an asterisk is displayed right on the label. If the Required property is on, but the control is empty when the user tries to submit the form, an error will show up.
Optional fields
Fields are optional as default and don't need a signifier.
Helper text
A helper text provides additional guidance about a field. For example, it can inform people about what kind of data they need to enter or how data will be used.
Related content
Max length
Controls can have rules about how many characters they allow. Character count can be defined for all Text Inputs and Textareas and displayed at the bottom right corner, the same row as the Helper text.
Arrangement
Fields are usually displayed in forms with a variety of input controls. The standard way to stack multiple fields is vertical, but horizontal forms are allowed in some exceptions.
Vertical stack
Use a single-column layout. Multiple-column layouts can be confusing because people must think about the right direction to fill the form. Additionally, they are not mobile-friendly. The distance between fields should be 16px/MD.
Related content
Horizontal stack
In some cases—mainly when using filters—we can display single-row forms. The distance between fields should be 16px/MD.
Related content
Behavior
Width
The Control defines the width of a Field. Fields hold a 100% width by default.
Quality checklist
This component passes the Release Candidate quality checklist described in our Component lifecycle.
Maturity
α · Design tokens
It uses Ariane design tokens.
α · Official assets
It uses the official Ariane assets (e.g., icons and illustrations) in one of the official sizes.
α · Accessible use of color
Its color contrast ratio is at least 4.5:1 for text and interactive areas.
α · Target areas
Its interactive target areas are large enough for users to accurately select them, following the Fitts law.
α · Naming agreement
Its name is agreed upon and shared between design and development.
α · Responsive L1
Is responsive to different viewport sizes.
α · User-triggered states
If the component is interactive, all its possible user-triggered interactive states are defined.
β · Responsive L2
The responsive behavior has been reviewed and validated by the team.
β · State properties
All the possible state attributes are defined.
β · Docs L1
It has essential documentation with at least primary usage.
β · Use cases
All the uses are audited and refined.
RC · Definition agreement
Its naming and properties are audited and aligned in design and code.
RC · Accessible L1
Its accessibility is manually audited, and any significant issues are fixed.
RC · Docs L2
The documentation covers the most common use cases and is expected to be iterated during the Release Candidate phase.
RC · Storybook
Includes a Storybook playground of the component.
Stable · Stable API
The component and its API remain stable, with no breaking changes for at least one month.
Stable · Adaptive
Supports adaptive design via preference queries.
Stable · Docs L3
Detailed documentation exists for design, content, accessibility, and implementation, including do’s and dont’s.
Stable · Tooling
Tooling (such as linters, codemods, etc.) exists to help with migrations and prevent further use of alternatives.