A number that drags, types, and steps, as a ScrubInput, in a field as tall as an Input.
Installation
Examples
Default
A NumberField is a ScrubInput in a field as tall as an Input: drag it sideways, click to type, or step it with the arrow keys by step, Shift by 10, within min and max. A double-click restores defaultValue. For a bare number in an editor's panel, use the ScrubInput itself.
In a field
In a Field, the label and note reach its input. What format writes after the last digit reads as the unit, as in a ScrubInput.
From 1 to 100 MB per photo.
Without dragging
scrub={false} takes the drag away, for a number you'd rather type, such as a year; a click anywhere on the field still types. scrub="vertical" drags it up and down instead.
Sizes
default and lg, as tall as an Input of each size.
Anatomy
Each part's data-slot, which a theme styles, is beside it. NumberField renders a ScrubInput, whose parts keep their slots.
bun add @roprgm/ui