Form input

Number input

Predictable numeric models, decimal-safe stepping, and consistent M3 controls.

Playground

Configure the component and copy synchronized Vue code.

Interactive preview

Changes are reflected in the example and source.

Properties

Controls

Step

Slots

Vue

<m-number-input v-model="quantity" controls="split" :step="1" label="Quantity">
</m-number-input>

Token map

The manual manifest combines inherited token owners with local deltas.

MNumberInput · All115 tokens
md-number-input

MNumberInput API

Props, slots, and events are generated from the current public kit contract.

MNumberInput

Field family
src/runtime/components/ui/number-input

Props

NameTypeDefault
disabledPrevents interaction and applies the disabled visual state.
booleanfalse
loadingReplaces content with progress feedback and prevents interaction.
booleanfalse
readonly
booleanfalse
variant
'filled' | 'outlined''filled'
rounded
'sharp' | 'small' | 'medium' | 'large' | 'pill''small'
labelPlacement
'top' | 'float' | 'inset' | 'hidden''float'
path
stringundefined
name
stringundefined
label
stringundefined
placeholder
stringundefined
helperText
stringundefined
error
booleanfalse
errorMessage
stringundefined
required
booleanfalse
autofocus
booleanfalse
autocomplete
stringundefined
density
'compact' | 'default' | 'comfortable''default' as MFieldDensity
min
numberundefined
max
numberundefined
step
number1
precisionDecimal places. Inferred from `step` when omitted.
numberundefined
locale
string'en-US'
useGrouping
booleantrue
controls
'split' | 'stacked' | 'scrub' | false'split'
clampPull committed values back inside `min`/`max`. Never applied per keystroke.
booleantrue
unitsUnits to choose from. With a list the unit zone becomes a menu bound to `v-model:unit`; without one it stays a static suffix. Picking a unit **relabels only** — the number is left exactly as it is. Converting 512 MiB into 0.5 GiB needs a scale the field does not have, and silently rescaling a value the user typed is worse than not converting.
MNumberInputUnit[]undefined
unitLabelAccessible name of the unit menu trigger.
stringMESSAGES.numberUnit
incrementLabelAccessible name of the increase control.
stringMESSAGES.numberIncrement
decrementLabelAccessible name of the decrease control.
stringMESSAGES.numberDecrement

Slots

Events

@incrementnumber
@decrementnumber
@invalidstring