Number field
A number field with a stepper on each side, whose digits roll up or down when the value is stepped.
Examples
Default
Step it with the buttons or the arrow keys and its digits roll; typing never rolls.
Format
format takes Intl.NumberFormat options, and Shift steps by largeStep. For money, use the Money input.
Scrub area
Wrap the label in NumberInputScrubArea to change the value by dragging it.
Installation
npx shadcn@latest add https://kinoui.com/r/number-input.json- Files
lib/refs.tslib/reduce-motion.tscomponents/kino/input.tsxlib/resize.tslib/roll.tsxcomponents/kino/number-input.tsx- Packages
@ui-sdk/core@ui-sdk/react- Global CSS
- the feels, the density tokens, the shape tokens and the success and warning colours
New to Kino? Installation covers what your project needs first and the @kino namespace.
API reference
NumberInput
Holds the value. Other props go to ui-sdk's NumberInput (opens in a new tab).
NumberInputGroup
Input's box, around the input and its steppers. Other props go to ui-sdk's NumberInputGroup (opens in a new tab).
NumberInputDecrement
The minus button, named "Decrease". Other props go to ui-sdk's NumberInputDecrement (opens in a new tab).
NumberInputIncrement
The plus button, named "Increase". Other props go to ui-sdk's NumberInputIncrement (opens in a new tab).
NumberInputControl
The input, whose digits roll while the value is stepped. Other props go to ui-sdk's NumberInputControl (opens in a new tab).
RollingInput
The input with its rolling copy, for a field of your own inside a NumberInput, as the Money input is. It takes NumberInputControl’s props, and a className that sets where the text sits on both.
NumberInputScrubArea
An area that changes the value when dragged sideways, or up and down with orientation. While it drags, the pointer is locked and the area draws a ↔ cursor in its place. Other props go to ui-sdk's NumberInputScrubArea (opens in a new tab).
Accessibility
- The input is a spin button: the arrow keys step it, Shift with them steps by
largeStep, and Home and End go tominandmax. - A stepper turns off at the limit it can’t pass.
- The rolling digits are drawn over the input for the eye only; screen readers read the input’s value.
- When the system asks for less motion, the digits only crossfade.
For agents
What an agent reads on this example with snapshot(), and the actions it can call with act().
The Agent bridge page sets up snapshot() and act() in your app.