Native HTML inputs restyled to match the system — text input, select, textarea, checkbox, radio, and toggle. All controls share a 32 px standard height, 6 px corner radius, and a soft --accent-glow focus ring instead of the bare browser outline.
Forms compose native elements (<input>, <select>, <textarea>) inside a labeled .ds-field wrapper that supplies the visual chrome: 12/600 label on top, control in the middle, optional 12 px help text below. Toggles use a custom .toggle primitive that flips on click via a state class.
.req on labels for required fields.| Element | Class | Notes |
|---|---|---|
| Field wrapper | .ds-field | Vertical label + control + help text stack with consistent gap. |
| Required marker | .req | Asterisk inside the label for required fields. |
| Help text | .help | 12/400 help-text-colored note under the control. |
| Text input | <input type="text"> | 32 px height, 6 px radius, accent focus ring. |
| Select | <select> | Same chrome as text input. Use native rendering — don't rebuild as a div. |
| Textarea | <textarea> | Multi-line variant. Use rows attr to set initial height. |
| Toggle | .toggle + .toggle.on | Custom switch. Click adds/removes .on class via JS. |
| Control | When to use |
|---|---|
| Text input | Free-form short strings — names, identifiers, search queries. |
| Select | One-of-N choice from a known list with ≤20 options. |
| Textarea | Multi-line free-form text — descriptions, notes, messages. |
| Checkbox | Independent on/off choices — "Notify me", "Auto-archive". |
| Radio | Mutually exclusive choice from a small set (≤5 options). |
| Toggle | Binary setting with immediate effect — applies on flip, no save button. |
.ds-field — never rely on placeholder text as the label..help.<select> as a custom dropdown unless you genuinely need search or grouping..req for consistent danger-tint styling.