Input Number

Input numerical values with a customizable range.

Basic usage

TIP

When inputting invalid string to the input box, input value will emit NaN to the upper layer as result of error

Disabled

Steps

Allows you to define incremental steps.

Step strictly

Precision

TIP

The value of precision must be a non negative integer and should not be less than the decimal places of step.

Size

Use attribute size to set additional sizes with large or small.

Controls Position

Custom Icon 2.6.3

API

Attributes

NameDescriptionTypeDefault
model-value / v-modelbinding valuenumber
minthe minimum allowed valuenumber-Infinity
maxthe maximum allowed valuenumberInfinity
stepincremental stepnumber1
step-strictlywhether input value can only be multiple of stepbooleanfalse
precisionprecision of input valuenumber
sizesize of the componentenumdefault
readonly 2.2.16same as readonly in native inputbooleanfalse
disabledwhether the component is disabledbooleanfalse
controlswhether to enable the control buttonsbooleantrue
controls-positionposition of the control buttonsenum
namesame as name in native inputstring
label a11y deprecatedsame as aria-label in native inputstring
aria-label a11y 2.7.2same as aria-label in native inputstring
placeholdersame as placeholder in native inputstring
idsame as id in native inputstring
value-on-clear 2.2.0value should be set when input box is clearednumber / null / enum
validate-eventwhether to trigger form validationbooleantrue

Slots

NameDescription
decrease-icon 2.6.3custom input box button decrease icon
increase-icon 2.6.3custom input box button increase icon

Events

NameDescriptionType
changetriggers when the value changesFunction
blurtriggers when Input blursFunction
focustriggers when Input focusesFunction

Exposes

NameDescriptionType
focusget focus the input componentFunction
blurremove focus the input componentFunction

Source

ComponentDocs

Contributors