Forms
IFormField
The label, description, hint, help and error around a control. It generates an id, points the label at it, links the description and error with aria-describedby, and sets invalid on the control.
Shown to the client on the PDF.
You do not pass an id — the field makes one and wires both ends.
Hint and help
hint sits at the end of the label row — for "Optional", a character count, a link to a definition. help sits under the control, for guidance that is not an error.
Leave blank if the client is outside the EU.
Required
Errors
Inside an IForm, name connects the field to a validation error and the message appears on its own. Set error by hand only outside a form.
Enter a valid email address.
An error replaces the help text rather than stacking with it.
Any control
The wiring reaches every field in the library, including composed ones like IPasswordInput and multi-part ones like ISelect, whose attributes land on the trigger.
Only you can see these.
ICheckbox, ISwitch and IRadioGroup carry their own label. Inside a field, set the text on the field and leave the control's own label off, or it is announced twice.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
name | string | — | Dot-path connecting the field to a form error |
label | string | — | Label text |
description | string | — | Text under the label, linked to the control |
hint | string | — | End of the label row |
help | string | — | Under the control; replaced by an error |
required | boolean | false | Adds the asterisk |
error | string | — | Error message; supplied by IForm when inside one |
unstyled | boolean | — | Drop built-in classes |
class | string | — | Merged with the built-in classes |
ui | { root?, header?, label?, hint?, description?, error?, help? } | — | Per-slot class overrides |
Slots
| Slot | When to use it |
|---|---|
| default | The control |
hint | The hint needs markup, such as a link |