A styled <p> for a form field's error/validation text.
Use ErrorMessage when composing a custom form control that needs standalone error text. The higher-level fields (TextInput, Textarea, …) render their own helper/error text via FormComponent, so you rarely need it directly.
There is no @uxf/form twin.
import { ErrorMessage } from "@uxf/ui/error-message";
<ErrorMessage id="email--error-message">This field is required.</ErrorMessage>;
| Prop | Type | Default | Description |
|---|---|---|---|
children |
ReactNode |
— | Error text. |
id |
string |
— | id of the <p> (wire it to the control's aria-describedby). |
Import the component stylesheet once in your global CSS:
@import url("@uxf/ui/css/error-message.css");