# Form fields

Form fields: a free component, built on your design tokens, to use when the assistant needs a few details it cannot guess, such as a delivery change, a request or a problem report. A short form of one to eight fields (text, number, choice, date or switch) with hints, checks as you leave a field, and Continue and Cancel buttons.

Prompt: Add the OpenDesigner component form-fields to this project: https://opendesigner.dev/library/form-fields.html. Keep its markup and states; map its --ds-* variables to my tokens.

States: filled, optional, error, switch on, switch off, hover, focus, disabled, buttons stack on a phone.

Accessibility: Each control sits inside its label; hints and error messages are linked with aria-describedby, a wrong field gets aria-invalid, and Continue moves focus to the first field to fix. Toggles are switches (role=switch).

File: https://opendesigner.dev/library/form-fields.html

Catalog entry (parts, data limits, states, tokens): https://opendesigner.dev/library/form-fields.json

Download: `curl -fsSLo form-fields.html https://opendesigner.dev/library/form-fields.html`
