Forms
Rules
- React Hook Form for form state —
useForm()+register()or Controller - Zod schema for validation — share between client and server
- Error display: inline under each field, red text, associated via
aria-describedby - Multi-step forms: wizard pattern with step state, validate each step independently
- File uploads: separate component with preview, drag-and-drop, progress indicator
- Autosave for long forms — debounced save to server/localStorage
- Accessibility: labels, error descriptions, focus management on validation failure
- Disable submit during loading — show spinner, prevent double submission