Input quantity

Interactive documentation for the quantity input component. Change props in the playground, inspect states, and copy the generated example.

Preview

Code

<InputQuantity
  v-model="quantity"
  :max="10"
/>

Value

Value: 1/ Max: 10

Sizes

Examples for supported quantity input sizes and steps.

Size l (step 1)

Size xl (step 3)

States

Common quantity input states for default, disabled, increment lock, and decrement lock.

Default

Disabled

Increment locked

Decrement locked

Props

This table matches the current InputQuantityProps interface.

PropTypeDefaultDescription
modelValuenumber1Current quantity value used by v-model.
size'l' | 'xl''l'Controls height, typography, icon size, spacing, and button width.
stepnumber1Increment and decrement step value. Values lower than 1 are normalized to 1.
maxnumber | nullnullMaximum allowed quantity value. Null removes the upper limit.
disabledbooleanfalseDisables the entire quantity input and both action buttons.
disabledIncrementbooleanfalseDisables only the increment button.
disabledDecrementbooleanfalseDisables only the decrement button.
classstring'w-full'Additional classes applied to the root container.
idstring'quantity'Input id attribute used for accessibility and form association.
namestring'quantity'Native input name attribute used in form submissions.