Forms
IInput
A text field with three sizes, an invalid state, affix slots, and optional clearing, loading and debouncing.
Sizes
Affixes
The leading and trailing slots take real space in the field rather than sitting on top of it, so a long value is never hidden under an icon.
Clearable and loading
clearable adds a clear button whenever the field is non-empty. loading shows a spinner in the trailing area and leaves the field typeable.
Debounce
debounce delays the model update, never the displayed text. Blur and Enter flush a pending update, and an external write cancels whatever is queued.
Model: —
Invalid
Inside an IFormField, invalid is inferred from the field's own state.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
modelValue | string | '' | v-model |
type | string | 'text' | Any native input type |
size | 'sm' | 'md' | 'lg' | 'md' | Control scale |
placeholder | string | — | |
disabled | boolean | false | |
required | boolean | false | |
id | string | generated | Useful when an external ILabel targets it |
invalid | boolean | inherited | Error styling; inferred inside IFormField |
clearable | boolean | false | Clear button while non-empty |
loading | boolean | false | Trailing spinner. Does not disable the field |
debounce | number | 0 | Milliseconds to wait before the model updates |
clearLabel | string | 'Clear' | Accessible name for the clear button |
unstyled | boolean | — | Drop built-in classes |
class | string | — | Lands on the wrapper, which carries the field chrome |
ui | object | — | root, input, leading, trailing, clear |
The field chrome lives on a wrapper element rather than the <input>, so class targets the wrapper; reach the input itself with ui.input.
Attributes such as name, autocomplete, maxlength and aria-label are forwarded to the <input>, and ref exposes the element as .input for focus management.