Form
Use a form to collect one or more pieces of information in a single submission. A form wraps a set of fields with shared submission, validation and layout.
Use one to:
- collect credentials, to sign in or sign up
- change app, organisation or account settings
- create or configure resources such as metrics, triggers and log sources
- validate input before it is sent to the server
A form follows the structure of a box:
| Region | What it holds |
|---|---|
| Header | The form title, and an optional description for context |
| Content | The fields. Each has a label, an input, and optional helper or error text. Related fields can be grouped in fieldsets |
| Footer | The action buttons: usually one primary button, such as Save or Create, and an optional secondary button, such as Cancel |
How to lay a form out, choose its controls and write its help text is on the forms pattern page.
Where it exists
forms-form--text-input (open it in Storybook). One of 8 stories. Drag the bottom edge to resize. ⚠️ The frame renders the component at the frame's own width, so in a narrow pane you are seeing a narrow rendering rather than the canonical one.| axis | value |
|---|---|
| React module | yes — local component |
| React tier | local |
| CSS class | .c-form |
| CSS files | form.css |
| Storybook | yes |
| Figma | not mapped |
| Uses in product | 310 |
| Uses in admin | 8 |
| Seen as | css-class-attribute, jsx-tag |
| Join provenance | inferred:kebab |
An empty cell above is a measurement, not an omission: every axis is printed whether or not it is populated. What each one costs is on /gaps.md, linked from the axis name wherever this page has a gap.
Members
A member is attached to its parent at module scope, so it is imported through the parent and versioned with it. Members have no page of their own: they declare no CSS class, carry no story and join no Figma set, and their uses are counted against the parent rather than separately.
Form.Checkbox— 6 uses in the productForm.CheckboxGroup— 4 uses in the productForm.Description— 28 uses in the productForm.Error— 12 uses in the productForm.Field— 61 uses in the productForm.Input— 35 uses in the productForm.Label— 52 uses in the productForm.Radio— 2 uses in the productForm.RadioGroup— 1 use in the productForm.Select— 10 uses in the productForm.SubmitButton— 15 uses in the productForm.TextArea— 7 uses in the product