HelpText
FormSmall hint or error text displayed below a form input.
Playground
Enter a valid email address.
Controls
Display as red error text.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
error | boolean | false | Displays text in danger color with role="alert". |
id | string | — | ID to reference via aria-describedby on the input. |
Examples
Hint
Enter a valid email address.
vue
<DsHelpText>
Enter a valid email address.
</DsHelpText>Error
This field is required.
vue
<DsHelpText error>
This field is required.
</DsHelpText>Accessibility
- Reference via aria-describedby on the associated input.
- Error state applies role="alert" for immediate screen reader announcements.
