Inputs
Form
Container that organises inputs, switches, radios, checkboxes and actions with uniform spacing.
Examples
States
DefaultFocusError
Anatomy
| # | Part | Description | Presence |
|---|---|---|---|
| 1 | Title | Names the form (aria-labelledby) | Required |
| 2 | Fields | 24px vertical gap, 16px between paired fields | Required |
| 3 | Error summary | Appears on submit, focus moves to it | Optional |
| 4 | Actions | Primary on the right, Cancel as neutral | Required |
Specifications
| Inner padding | 40px |
|---|---|
| Vertical gap | 24px between children |
| Field row gap | 16px horizontal for dual inputs |
| Radius | Matches the core card system |
Interaction
| Key | Result |
|---|---|
| Tab | Follows visual order |
| Enter | Submits from a text field |
| Esc | Does nothing; never discards input |
| Trigger | Response |
|---|---|
| Submit with errors | Summary appears and takes focus; each item links to its field |
| Blur | Validates one field |
Accessibility
role · form
1.3.1Info and Relationships3.3.1Error Identification3.3.2Labels or Instructions3.3.3Error Suggestion4.1.3Status Messages
| Requirement | How Rig meets it |
|---|---|
| Structure | <form>, <label>, <fieldset> and <legend> in that order |
| Errors | Summary with role="alert", linked items, and field-level messages (WCAG 3.3.1, 3.3.3) |
| Required | State it in text |
| Redundant entry | Do not ask for the same data twice (WCAG 3.3.7) |
Read the matching WAI pattern ↗
Usage
| Do | Don’t |
|---|---|
| Group related fields | Do not validate on every keystroke |
| Preserve what the person typed on error | Do not use placeholders as labels |
Notes from the Figma file
- Validation state propagates from the form to each sub-field.