Skip to content

MazInputNumber

MazInputNumber is a number input component with increment and decrement buttons for user-friendly input. Customizable size, disabled state, and limit values.

Basic usage



numberValue:

No buttons

You can remove the buttons with the props hide-buttons

Props

NameDescriptionTypeRequiredDefault
styleThe inline style object for the component.HTMLAttributes['style']Noundefined
classThe CSS class name for the component.HTMLAttributes['class']Noundefined
model-valuev-model
The value of the component (v-model).
numberNoundefined
disabledWhether the input number is disabled or not.booleanNofalse
maxThe maximum value allowed for the input number.numberNoNumber.POSITIVE_INFINITY
minThe minimum value allowed for the input number.numberNoNumber.NEGATIVE_INFINITY
stepThe step value for incrementing or decrementing the input number.numberNo1
sizeThe size of the input number component.MazSizeNo'md'
hide-buttonsWhether to hide the increment and decrement buttons or not.booleanNofalse
text-centerWhether to center the text inside the input or not.booleanNotrue
inputmodeThe inputmode attribute for the input.HTMLAttributes['inputmode']No'numeric'
blockThe input will be displayed in full widthbooleanNoundefined
errorWill display the input in error state.booleanNofalse
hintThe hint text to display below the input.stringNoundefined
successWill display the input in success state.booleanNofalse
warningWill display the input in warning state.booleanNofalse
input-propsThe props for the input component.MazInputPropsNoundefined

Events

Event namePropertiesDescription
focusvalue Event - event objectEmitted when the input is focused
changevalue Event - event objectEmitted when the value change
blurvalue Event - event objectEmitted when the input is blurred
clickvalue Event - event objectEmitted input is clicked
update:model-valuevalue number | undefined - value of the inputEmitted when the input value change