Input Number

Numeric input with bounds, stepping controls, and decimal precision.

Input Number

Default

Bind a number with v-model. Click or hold the controls, type directly, or use ArrowUp / ArrowDown while the input is focused.

Range and step

Compare range limits, strict integer steps, decimal precision, and clear-value fallback. Precision should accommodate the decimal places in step.

States and controls

Disabled blocks interaction, readonly preserves a non-editable value, and controls=false hides the buttons while keeping typing and arrow-key stepping.

Colors

Color controls the text and step icons; background controls the surface. Hover and focus retain the chosen colors with a soft inset shadow. Choose custom colors with sufficient contrast.

Shape

Compare rounded and square side by side. Shape applies to the shell and inner input; explicit values override global configuration.

API

PROPS

Property
Type
Values
Description
default
Example
More
v-model
Number
number | null
Bound numeric value; clearing can emit null.
—
min
Number
Number
Minimum allowed value.
-Infinity
max
Number
Number
Maximum allowed value.
Infinity
step
Number
Number
Amount added or subtracted by each step.
1
step-strictly
Boolean
true | false
Constrain committed values to multiples of step.
false
precision
Number
non-negative integer
Decimal places; must not be smaller than the decimal places in step.
—
value-on-clear
String | Number | null
min | max | number | null
Value used after clearing: a number, min, max, or null.
—
disabled
Boolean
true | false
Disable editing and stepping.
false
readonly
Boolean
true | false
Display the value without allowing edits or steps.
false
controls
Boolean
true | false
Show the decrease and increase buttons.
true
color
String
theme color | CSS color
Text and control color, using a theme color or CSS color.
light (light mode), dark (dark mode)
background
String
theme color | CSS color
Surface color, preserved during hover and focus.
primary
shape
String
rounded | square
Rounded or square geometry; inherits global configuration.
rounded
id
String
String
Native input id.
—
name
String
String
Native input name.
—
label
String
String
Input label.
—
placeholder
String
String
Text displayed when empty.
—

EVENTS

Event
Type
Description
default
Example
More
update:modelValue
(value: number | null | undefined) => void
Update the controlled value.
—
—
input
(value: number | null | undefined) => void
Emit while typing or stepping.
—
—
change
(value: number | null | undefined, oldValue: number | null | undefined) => void
Emit when a changed value is committed.
—
—
focus
(event: FocusEvent) => void
Native input focus event.
—
—
blur
(event: FocusEvent) => void
Native input blur event.
—
—

EXPOSES

Method
Type
Description
default
Example
More
focus
() => void
Focus the inner input.
—
—
blur
() => void
Blur the inner input.
—
—
Last Updated: 2026-10-28, 06:17:56 UTC
Copied