MindeesUI
ComponentsForms

NumberInput

A numeric text input with optional stepper buttons, min/max clamping, and a parsed numeric callback.

NumberInput wraps Input with a numeric keyboard and optional -/+ stepper buttons on the trailing edge. It surfaces both the raw text (onChangeText) and the parsed number (onChangeValue), and the stepper respects min, max, and step.

Import

import { NumberInput } from '@mindees/ui';

Usage

<NumberInput
  value={qty}
  onChangeText={setQty}
  onChangeValue={setQtyNumber}
  min={0}
  max={99}
  step={1}
  showStepper
/>

Props

PropTypeDefaultDescription
minnumberMinimum allowed value. The stepper and clamping respect this.
maxnumberMaximum allowed value. The stepper and clamping respect this.
stepnumber1Increment used by the stepper buttons.
showStepperbooleanfalseRender -/+ stepper buttons on the trailing edge.
valuestringControlled text value.
onChangeText(text: string) => voidFired with the raw text on every change.
onChangeValue(value: number) => voidFired with the parsed number; NaN when the field is empty or invalid.

Extends InputProps minus keyboardType and trailing (both managed internally). size, leading, invalid, and disabled all apply.

Accessibility

The stepper buttons expose accessibilityRole="button" with Increment/Decrement labels. The underlying field inherits Input's FormField wiring, so a FormField label and error are announced automatically.

On this page