Skip to content

TextlineOptions

Defined in: components/textline.ts:25

Options for textline.

optional attrs?: string

Defined in: components/field.ts:12

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

FieldOptions.attrs


optional label?: Slot

Defined in: components/field.ts:14

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

FieldOptions.label


optional help?: Slot

Defined in: components/field.ts:16

Helper text shown beneath the control.

FieldOptions.help


optional error?: string

Defined in: components/field.ts:21

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

FieldOptions.error


optional disabled?: boolean

Defined in: components/field.ts:23

Disables the control.

FieldOptions.disabled


optional required?: boolean

Defined in: components/field.ts:25

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

FieldOptions.required


optional name?: string

Defined in: components/field.ts:27

The name attribute, for native form submission.

FieldOptions.name


optional id?: string

Defined in: components/field.ts:29

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

FieldOptions.id


optional inputAttrs?: string

Defined in: components/field.ts:31

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

FieldOptions.inputAttrs


optional prefix?: Slot

Defined in: components/field.ts:46

Content drawn inside the control, against its leading edge — typically a unit, a currency sign or a search glyph. The control’s text is indented to keep clear of it, however wide it turns out to be.

InsetOptions.prefix


optional suffix?: Slot

Defined in: components/field.ts:53

Content drawn inside the control, against its trailing edge: a send button on a chat box, a clear or reveal button, a character count. Sits against the bottom on a (growing) textarea, and vertically centred on a single-line input.

InsetOptions.suffix


optional type?: TextlineType

Defined in: components/textline.ts:27

Input type. Defaults to "text".


optional placeholder?: string

Defined in: components/textline.ts:29

Placeholder text.


optional bind?: Bindable<string | number>

Defined in: components/textline.ts:31

Two-way binding target (e.g. A.ref($user, "name")).


optional value?: string | number

Defined in: components/textline.ts:33

Static initial value (use bind for reactivity).


optional autocomplete?: string

Defined in: components/textline.ts:35

Autocomplete hint passed to the native autocomplete attribute.


optional input?: (event) => void

Defined in: components/textline.ts:37

Fired on every input event with the native event.

Event

void


optional change?: (event) => void

Defined in: components/textline.ts:39

Fired on change (commit) with the native event.

Event

void