Number Input
Numeric input with stepper buttons, min/max clamping, precision, and locale-aware formatting.
Preview
example.tsxtsx
Playground
Flip props to see how the component responds. The snippet below updates as you change options.
Installation
Install the individual package:
$ pnpm add @sisyphos-ui/number-input @sisyphos-ui/coreOr use the umbrella package that bundles everything:
$ pnpm add @sisyphos-ui/uiUsage
Import the component styles and the component itself:
snippet.tsxtsx
import "@sisyphos-ui/number-input/styles.css";
import { NumberInput } from "@sisyphos-ui/number-input";With currency prefix
`prefix` + `precision` format money-shaped values.
example.tsxtsx
$
With suffix
Put units after the value with `suffix`.
example.tsxtsx
kg
Error state
Track validation yourself and toggle `error` on the control.
example.tsxtsx
At least 1 seat is required.
API
Props table is being written. See the package README for the complete API surface.
The full API including refs, ARIA attributes, and HTML passthroughs lives in the package README.
Was this page helpful?
Edit this page on GitHub