Skip to content
Hazine

Number and quantity inputs

1 of 6 shipped. Each take is a different structure, and the note under its title says how.

  • number and quantity inputs

    Explicit decrement and increment buttons on either side of a centred, typeable value, with accelerating press and hold repeat and buttons that disable at the bounds.

    shadcn add @hazine/number-input-stepper-buttons

    Depends on @hazine/use-controllable-state, lucide-react, class-variance-authority

Planned 5

  • Drag Scrub Number Input

    Value changes by dragging the label horizontally with modifier-key precision, no visible stepper buttons.

  • Number Input with Range Feedback

    Out-of-range entry is corrected on blur with an explanatory message and a range position track, instead of silently blocking keys.

  • Unit Conversion Number Input

    Two synchronised spinbuttons bound to one canonical value, rather than one field with a unit label.

  • Percent Split Inputs

    Multiple interdependent fields constrained to a fixed sum, with locking, auto-rebalance and a proportional bar.

  • Collapsing Add Quantity Input

    Morphs between a button and a stepper depending on value, with a contextual remove action at the lower bound.