Skip to content

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.

EUR

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

PropTypeDefaultDescription
modelValuestring''v-model
typestring'text'Any native input type
size'sm' | 'md' | 'lg''md'Control scale
placeholderstring
disabledbooleanfalse
requiredbooleanfalse
idstringgeneratedUseful when an external ILabel targets it
invalidbooleaninheritedError styling; inferred inside IFormField
clearablebooleanfalseClear button while non-empty
loadingbooleanfalseTrailing spinner. Does not disable the field
debouncenumber0Milliseconds to wait before the model updates
clearLabelstring'Clear'Accessible name for the clear button
unstyledbooleanDrop built-in classes
classstringLands on the wrapper, which carries the field chrome
uiobjectroot, 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.