DDS/Components/Number Input

Number Input

Form

A numeric input with integrated increment and decrement buttons, min/max support.

Props

PropTypeDefaultDescription
modelValuenumber0Current numeric value (v-model).
minnumberMinimum allowed value.
maxnumberMaximum allowed value.
stepnumber1Increment/decrement step.
size'sm' | 'md' | 'lg''md'Input height.
disabledbooleanfalseDisable all controls.
errorbooleanfalseError border state.

Examples

Sizes
vue
<script setup lang="ts">
const qty = ref(1)
</script>
<template>
  <DsNumberInput v-model="qty" :min="0" :max="99" />
</template>
Disabled

Skeleton

Use DsNumberInputSkeleton as a loading placeholder while content is being fetched.

Small
vue
<DsNumberInputSkeleton size="sm" />
Medium
vue
<DsNumberInputSkeleton size="md" />
Large
vue
<DsNumberInputSkeleton size="lg" />

Accessibility

  • Decrement/increment buttons have aria-label.
  • Native <input type="number"> beneath.