Single-line text input bound to a string attribute.
| Builder | F.text(attribute: string): TextInput |
| Wire type key | text-input |
| Class chain | TextInput → TextualField → Field |
| Detail projection | text-entry |
| Column counterpart | text cell, i.e. C.text(attribute) |
Example
import { F } from '@adonia/core'
F.text('title').label('Title').required().maxLength(140).live()Props
Beyond the shared field DSL:
| Prop | Declared on | Behaviour |
|---|---|---|
datalist(values: readonly string[]): this |
TextInput |
Native autocomplete suggestions (§7.3 datalist). Suggestions only — the value is NOT constrained to the list; use F.select for a closed set, which is also the only form §11.1 can enforce as an enum. |
mask(pattern: string): this |
TextualField |
Input mask as a REGEX SOURCE string ('^[A-Z]{2}-\\d{4}$'), not a RegExp: props ride the wire verbatim and must survive JSON.stringify (protocol §2 rule 1). The client uses it to constrain typing; §11.1 compiles the same source into regex(mask) so a client bypass cannot smuggle an unmasked value past the validator. |
Validation
Vine base: vine.string().
§11.1 mapping: vine.string().trim() plus the declared length and mask
modifiers, read off this.props so a withProps override behaves
identically to the typed DSL.
Contributed by TextualField.vineSchema() in packages/core/src/schema/fields/textual.ts. The shared modifiers (required, nullable, requiredWhen, unique, optionality) are applied on top by Field.buildValidation, and a rules() override replaces the base entirely — the validator compiler never branches on the field class.
Declared in
packages/core/src/schema/fields/text.ts—TextInputpackages/core/src/schema/fields/textual.ts—TextualField