OPUS/UI

Navigation

Number Input

Stepper with press-and-hold repeat, ↑/↓ (Shift ×10), Home/End, clamping, precision and Intl display formatting.

4 files · 306 locdeps: clsx, tailwind-merge

Total: $48.00

Hold a button to repeat · Shift+↑ jumps by 10 steps

Installation

With the shadcn CLI, pointing at this platform’s registry:

npx shadcn@latest add https://opusui.131199999.xyz/r/number-input.json

Or offline, straight from your opus55 checkout (copies every file it needs):

node ../tailwind_component/opus55/scripts/add.mjs number-input

Usage

import { NumberInput } from "@/components/opus/ui/number-input";

<NumberInput value={qty} onValueChange={setQty} min={1} max={20} />

API

PropTypeDefaultDescription
value / defaultValue / onValueChangenumber—Value.
min / max / step / precisionnumber—Bounds and stepping.
formatIntl.NumberFormatOptions—Display format while not editing.
controls"split" | "stacked""split"Button layout.

Command palette