Hacktron Design System

InputNumber

A number field with buttons to step the value up and down.

credits
<template>  <InputNumber v-model="state.trigger" :min="1" :step="50" class="w-32" /></template>

Props

Name Type Default
size"md" | "sm""md"
minnumber- (unbounded)
maxnumber- (unbounded)
stepnumber1 (UInputNumber's own default)
...propsUInputNumber props (modelValue, increment, decrement, disabled, ...)-

Guidelines

Do

  • Set min/max/step to match the real constraint (e.g. a credit threshold that only makes sense in multiples of 50 or 100) - the stepper buttons respect them directly.
  • Pair with a trailing unit label (e.g. "credits") as a sibling element, not inside the field itself - see the billing auto-topup settings for the pattern.

Don't

  • Don't use this for a value that isn't a real number a user increments/decrements - a plain Input with type="number" (no stepper chrome) fits a one-off numeric field better, e.g. a percentage typed directly.
  • Don't disable both increment and decrement just to get a plain numeric text field - reach for Input instead in that case.