Components › Forms
Number input
A number field with step keys. Arrow keys step by one, Shift by ten.
Installation
npx plankui@latest add number-inputUsage
import { NumberInput } from "@/components/ui/number-input";
<NumberInput defaultValue={5} min={1} max={100} />API reference
| Prop | Type | Default | Description |
|---|---|---|---|
| value / defaultValue | number | 0 | Value. |
| min / max / step | number | -∞ / ∞ / 1 | Bounds and increment. |
| format | (n: number) => string | Display format while not editing. | |
| onValueChange | (n: number) => void | Called on commit. |