Inputs
Input Number
Numeric input with increment / decrement controls, min/max bounds, precision, and custom formatting.
Basic (0–100)
Prefix / suffix
$USD
No controls
Disabled
Installation
npx benflux-ui add input-numberUsage
import { InputNumber } from "@benflux-ui/react"
const [value, setValue] = useState(0)
<InputNumber
value={value}
onChange={setValue}
min={0}
max={1000}
step={10}
precision={2}
prefix="$"
suffix="USD"
/>Props
| Prop | Type | Default | Description |
|---|---|---|---|
| value | number | — | Controlled value |
| onChange | (value: number) => void | — | Callback when value changes |
| min | number | -Infinity | Minimum allowed value |
| max | number | Infinity | Maximum allowed value |
| step | number | 1 | Increment / decrement amount |
| precision | number | — | Number of decimal places |
| prefix | ReactNode | — | Content rendered before the number |
| suffix | ReactNode | — | Content rendered after the number |
| controls | boolean | true | Show +/− increment buttons |
| disabled | boolean | false | Disable the input |