Component
Number input
<DomNumberInput>A labelled number field with native min / max / step support.
Playground
Try every prop live
Number input playground
Edit props in the inspector — min, max, step, and label update live.
Items per order.
Playground.vuevue
<script setup>
import { reactive } from 'vue';
import { DomNumberInput } from '@getdom/studio/vue';
const data = reactive({
"modelValue": 1,
"id": "",
"name": "",
"label": "Quantity",
"description": "Items per order.",
"placeholder": "",
"required": false,
"disabled": false,
"readOnly": false,
"invalid": false,
"errors": {},
"visible": true,
"validators": [],
"validateOnBlur": true,
"chrome": "field",
"min": 1,
"max": 99,
"step": 1
});
</script>
<template>
<DomNumberInput
v-bind="data"
@update:modelValue="data.modelValue = $event"
/>
</template>Demo
Live preview
Between 1 and 99.
Value: 3
Usage
Vue
<script setup>
import { DomNumberInput } from '@getdom/studio/vue';
import { ref } from 'vue';
const qty = ref(1);
</script>
<template>
<DomNumberInput
v-model="qty"
label="Quantity"
description="Between 1 and 99."
:min="1"
:max="99"
/>
</template>Props
Props
| Name | Type | Default | Description |
|---|---|---|---|
| v-model | number | 0 | Bound numeric value. |
| label | string | — | Label above the input. |
| description | string | — | Hint shown below the input. |
| min / max / step | number | — | Native numeric constraints. |
| disabled | boolean | false | Disable the input. |