Helper Text & Error States
How to add helper text and handle error states in React Checkbox Pro
Helper Text & Error States
Learn how to add helper text and handle error states in your checkboxes.
Example
This field is required
Please accept the terms
Usage
With Helper Text
With Error State
Combined with Validation
Props
Prop | Type | Description |
---|---|---|
helperText | string | Additional information displayed below the checkbox |
error | boolean | Whether the checkbox is in an error state |
errorMessage | string | Error message displayed when error is true |
Best Practices
- Use clear and concise helper text
- Display error messages that help users fix the issue
- Consider using validation on form submission
- Keep error messages close to their respective checkboxes
- Use consistent error styling across your form