Inputs · §5.3, §8.11

Form

The forms pattern: labels, help, inline errors and an error summary.

Theme
Contrast
Language
Motion
Text size
const form = useZodForm(schema); <Form errorSummaryTitle="…" form={form} messages={messages} onSubmit={save}>…</Form>

Accessibility

  • Visible labels; errors next to each field with aria-describedby and aria-invalid.
  • On a failed submit an error summary takes focus and links to each field.
  • Validates on submit, then on blur, never per keystroke.

Usage

Do

  • Schemas from @edflow/shared raise message keys; the form translates them.

Don't

  • No CAPTCHAs for patients.
  • Never clear what the person typed after an error.

Platforms

Web
apps/web/components/edflow/form/form.tsx
iOS
SwiftUI Form
Android
Compose Column of fields