Usage
TheVNumberInput component extends VTextField with number-specific controls and validation.
Min and Max
Constrain values to a specific range:Step Increments
Define the increment/decrement step:Control Variants
Choose different control layouts:Precision
Control decimal places:Hide Input
Show only the controls:Inset Controls
Place controls inside the input field:Reverse Controls
Position controls on the left:Props
The v-model value of the component
The minimum allowed value
The maximum allowed value
The increment/decrement step value
Number of decimal places to display and allow
Minimum number of fraction digits to display
Custom decimal separator character. Defaults to locale-specific separator
The layout style for increment/decrement controls
Positions the controls inside the input field
Hides the input field, showing only the controls
Positions the controls on the left side of the input
Disables the input and controls
Makes the input read-only
Puts the input in an error state
Label text for the input
Hint text to display below the input
Forces hint to always be visible
Visual variant of the input
Adjusts the vertical spacing
Applies specified color to the control
Slots
Slot to customize the increment button
Slot to customize the decrement button
Slot for content before the input
Slot for content after the input
Slot for content inside the input, before the value
Slot for content inside the input, after the value
Events
Emitted when the value changes
Emitted when focus state changes
The component automatically validates input and prevents values outside the min/max range. Values are clamped to the valid range on blur.
Keyboard support includes arrow keys (up/down) to increment/decrement values while the input is focused.
The increment and decrement buttons support long-press for continuous value changes.