Number Input

A numeric field with − and + buttons, limits and a step.
Stable
Web
iOS
Android
@advui/core
Source

Basic

Up to 10 per booking.

Installation

pnpm
pnpm add @advui/core
npm
npm install @advui/core

Usage

import { Field, NumberInput } from '@advui/core'

<Field label="Guests">
  <NumberInput defaultValue={2} min={1} max={10} />
</Field>

Examples

Decimal step

Value: 1.5

API reference

NumberInput

Also accepts Input props such as `invalid`, `placeholder` and `aria-label`.
PropTypeDefaultDescription
valuenumber | null—`null` when the field is empty.
defaultValuenumber | nullnullStarting `value` when uncontrolled.
onValueChange(value: number | null) => void—Called when a valid number is typed or stepped.
minnumber—Lowest value; typed values clamp on blur.
maxnumber—Highest value; typed values clamp on blur.
stepnumber1Amount added by the buttons and arrow keys.
decrementLabelstring'Decrease'Accessible name of the minus button.
incrementLabelstring'Increase'Accessible name of the plus button.
size'sm' | 'md' | 'lg''md'As Input.

Accessibility

  • The field is a spinbutton with aria-valuenow, aria-valuemin and aria-valuemax.
  • The − and + buttons are disabled at the limits.
  • On web the buttons are skipped by Tab, because the arrow keys do the same from the field.
Keyboard interactions
KeyAction
ArrowUp / ArrowDownAdds or removes one step.
Home / EndJumps to `min` / `max` when set.

Platform notes

iOS
VoiceOver swipe up / down steps the value (increment / decrement actions).
Android
TalkBack volume keys or swipes step the value (increment / decrement actions).
Since v0.4.0Last updated Nov 2, 2026Edit this page on GitHub