Build a form people can complete
Make each field, validation result, and next action clear in context.
What makes a form understandable?
Give every field a visible label, explain constraints before people need them, and keep related controls together. A placeholder is an example or hint, not a replacement for a label. Use the control that matches the value: Input for short text, Textarea for longer text, Select for one selected option, Checkbox for independent choices, and Switch for an immediate setting.
Field associates a control with its label, description and error. Form coordinates submission and validation; Fieldset groups related fields under a shared legend. Choose a grouping only when it helps someone understand the form. Put field errors next to the affected field and give form-level failures a clear summary when several values may be involved.
When should I validate?
Validate early when it gives useful guidance without blocking entry. Validate on submit when a rule requires the whole value or remote check. In either case, keep the message specific: identify what needs attention and how to correct it. Do not report success just because the browser accepted a value or the submit handler ran.
For async validation, distinguish checking from failure. Avoid racing responses: an older result must not replace feedback for the current value. Keep the current value and submission status in application state when the product needs retries, navigation persistence, or server recovery. A form primitive does not decide your server schema, authorization, persistence, or business rules.
Who owns submit state and recovery?
The caller handles submission and decides how to treat pending, success, and failure. Disable or otherwise guard duplicate submissions when the operation requires it, but retain enough context for correction. If saving fails, explain whether the entered values remain and what action can retry. Keep the submit Button's name tied to the action.
Ghost's source registry installs React components and their dependencies into the app. Follow Installation and the specific component recipe. See Styling for host tokens and component CSS.
How do I check keyboard and assistive use?
Use the rendered application to check that labels activate or identify their controls, required state is communicated, errors are associated with the right field, and keyboard users can reach and operate each control. Preserve visible focus and logical reading order. These checks are concrete responsibilities, not a blanket claim of conformance: a component's underlying primitives do not certify the accessibility of the complete form or its content.
For behavior patterns, WAI's form notifications guidance explains error and success feedback. React Aria documents a separate component system; Radix UI documents its own primitives. Ghost uses the behavior stated on its pages and does not require either library as an application-level dependency by virtue of this comparison.
What if errors or fields are hard to find?
Check label association, message placement, focus visibility, and the order in which errors are encountered. Avoid relying on red alone to communicate a problem. Keep the user's original input after a recoverable error. If validation depends on a remote service, show a pending state and a meaningful failure path rather than a false valid/invalid answer. The Form and Fieldset pages show supported composition; copy their existing recipes rather than inventing new component props.