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.

Character count ​

showCount puts a count in the trailing area. With maxlength it reads against the limit and turns red in the last tenth, which is also the only time screen readers hear it.

Pass countLabel to translate the announcement, as on ITextarea.

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
maxlengthnumber—Hard character limit
showCountbooleanfalseShow a character count in the trailing area
countLabel(remaining: number) => stringEnglishWhat screen readers announce near the limit
unstyledboolean—Drop built-in classes
classstring—Lands on the wrapper, which carries the field chrome
uiobject—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.