Skip to content

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.

Optional

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

PropTypeDefaultDescription
namestringDot-path connecting the field to a form error
labelstringLabel text
descriptionstringText under the label, linked to the control
hintstringEnd of the label row
helpstringUnder the control; replaced by an error
requiredbooleanfalseAdds the asterisk
errorstringError message; supplied by IForm when inside one
unstyledbooleanDrop built-in classes
classstringMerged with the built-in classes
ui{ root?, header?, label?, hint?, description?, error?, help? }Per-slot class overrides

Slots

SlotWhen to use it
defaultThe control
hintThe hint needs markup, such as a link