Skip to content

FieldOptions

Defined in: components/field.ts:12

Options shared by all form field components (textline, textarea, checkbox, autocomplete, …).

Fields share a consistent vertical layout: an optional label, the control itself, and optional help/error text below it. form relies on this shared structure to align groups of fields.

optional attrs?: string

Defined in: components/field.ts:14

Aberdeen attr/style string applied to the field’s wrapper element.


optional label?: Slot

Defined in: components/field.ts:16

Visible label, associated with the control via for/id for a11y.


optional help?: Slot

Defined in: components/field.ts:18

Helper text shown beneath the control.


optional error?: string

Defined in: components/field.ts:23

Error message shown beneath the control. When set, the control is marked aria-invalid and styled accordingly. May be reactive.


optional disabled?: boolean

Defined in: components/field.ts:25

Disables the control.


optional required?: boolean

Defined in: components/field.ts:27

Marks the field required (adds a * and the aria-required attribute).


optional name?: string

Defined in: components/field.ts:29

The name attribute, for native form submission.


optional id?: string

Defined in: components/field.ts:31

Explicit id for the control; auto-generated when omitted.


optional inputAttrs?: string

Defined in: components/field.ts:33

Aberdeen attr/style string applied to the control (input) element itself.