Forms
Best practices for designing forms, validation, and errors
Forms are critical interaction points where users input data to accomplish a task. Designing clear and efficient forms reduces friction and error.
Structure
Forms should follow a logical flow, grouping related information together.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Input Layouts
We typically place labels above inputs for optimal scannability and mobile responsiveness.
- Labels: Always include a label for accessibility.
- Placeholders: Never use a placeholder as a substitute for a label.
- Help Text: Use beneath the input to guide the user on formatting expectations.
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Validation and Errors
Error messages must be inline, clear, and actionable. They should explain what went wrong and how to fix it.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.