VInputNumber ​

VInputNumber is an extended numeric input with optional unit display, text alignment control, and custom prefix/suffix or control-icon slots.

Basic Usage ​

Basic numeric input with step controls.

With Unit ​

Use unit to render a visual unit label without changing the emitted numeric value.

Alignment ​

Use align to control the inner text alignment.

Behavior Notes ​

  • While typing, the component keeps the raw input text and normalizes it on change / blur.
  • Clearing the input returns null by default. Use value-on-clear to return min, max, or a custom number instead.
  • When step-strictly is enabled, committed values are rounded to the nearest multiple of step.
  • Values committed outside [min, max] are clamped back into range.
  • unit only affects the visual label rendered beside the input.
  • Scientific notation such as 1e3 is not supported.

API ​

VInputNumber Attributes ​

NameDescriptionTypeDefault
model-value / v-modelbinding valuenumber / null—
minminimum allowed valuenumberNumber.MIN_SAFE_INTEGER
maxmaximum allowed valuenumberNumber.MAX_SAFE_INTEGER
stepincremental stepnumber1
step-strictlywhether the committed value must be a multiple of stepbooleanfalse
precisionprecision of the committed valuenumber—
sizecomponent sizeenum—
readonlysame as native readonlybooleanfalse
disableddisable the input; also inherits disabled state from parent el-formbooleanfalse
controlswhether to show increase/decrease buttonsbooleantrue
controls-positionposition of the control buttonsenum'right'
value-on-clearvalue used when the input is clearedenum / number / nullnull
namesame as native namestring—
placeholdersame as native placeholderstring—
idsame as native idstring—
titlesame as native titlestring—
maxlengthsame as native maxlengthstring / number—
minlengthsame as native minlengthstring / number—
validate-eventwhether to trigger parent form-item validation on change and blurbooleantrue
aria-labelnative aria-label attributestring—
inputmodenative inputmode attributestring—
alignalignment for the inner input textenum'left'
unitvisual unit label displayed beside the inputstring''

VInputNumber Events ​

NameDescriptionType
update:model-valuetriggered when the normalized value changesfunction
changetriggered after a value change is committedfunction
blurtriggered when input loses focusfunction
focustriggered when input gains focusfunction
inputtriggered while typing or using controlsfunction

VInputNumber Slots ​

NameDescription
prefixprefix content
suffixsuffix content
decrease-iconcustom decrease button icon
increase-iconcustom increase button icon

Exposes ​

NameDescriptionType
focusget focus the input componentFunction
blurremove focus the input componentFunction

Source ​

Docs