Skip to content

Number Input

Last updated 24 Nov 2026

NbNumberInput is a numeric field with built-in stepper buttons (− and +). It shares the same design language as NbTextInput and NbSelect, with default and fluid variants.

Variants ​

Default ​

The label sits above the field. Steppers are at the trailing edge: ghost, icon-only NbButtons the size of the field, each as wide as the field is tall.

Fluid ​

The label sits inside the field, where a placeholder would be while it is empty, and steps up and shrinks once it has a value or focus. The helper is an icon on the value line. The field keeps the height of its size (xs is drawn at sm), like every fluid field.

vue
<template>
  <NbNumberInput
    v-model="count"
    variant="fluid"
    label="Editors"
    :min="1"
    :max="4"
  />
</template>

Props ​

PropTypeDefaultDescription
modelValuenumber | nullnullCurrent value (v-model)
labelstring-Label text
placeholderstring-Placeholder shown when value is empty
helperstring-Helper text below the field
errorstring-Error message: triggers error state
warningstring-Warning message: triggers warning state
minnumber-Minimum allowed value
maxnumber-Maximum allowed value
stepnumber1Increment/decrement amount per button press
variant'default' | 'fluid''default'Layout variant
disabledbooleanfalseDisables the field and buttons
requiredbooleanfalseMarks the field as required (adds *)
idstringautoNative input id (auto-generated if omitted)

Events ​

EventPayloadDescription
update:modelValuenumber | nullEmitted on every value change
changenumber | nullAlso emitted on every value change

Exposed ​

typescript
const inputRef = ref<InstanceType<typeof NbNumberInput>>()
inputRef.value?.focus()

Behavior ​

  • The user can type directly into the field. The value is clamped to min/max on blur or Enter.
  • The − button is dimmed when the value equals min.
  • The + button is dimmed when the value equals max.