Skip to content
Eskais UI

Forms

Number Input

UI SDK NumberInput: typed, stepped and formatted numbers with step buttons, named by Field.

Example

Between 1 and 50.

Installation

npx shadcn@latest add @eskais/number-input
Brings alonginputfieldtooltip
npm packageslucide-react

Usage

Import
import {  createNumberInputController,  NumberInput,  NumberInputControl,  NumberInputDecrement,  NumberInputGroup,  NumberInputIncrement,  NumberInputScrubArea,  NumberInputScrubAreaCursor,} from "@/components/ui/number-input"

API reference

NumberInputDecrement

PropTypeDefault
tooltipControlTooltipOption–

Also takes every prop of UI SDK NumberInputDecrement.

NumberInputIncrement

PropTypeDefault
tooltipControlTooltipOption–

Also takes every prop of UI SDK NumberInputIncrement.

NumberInputScrubAreaCursor

Takes every prop of UI SDK NumberInputScrubAreaCursor.

Other exports

createNumberInputControllertype NumberInputControllertype NumberInputStatetype NumberInputValueChangeReason

Accessibility

  • Arrow keys, Page Up/Down and Home/End step the value; the step buttons need their own aria-label.
  • Values are formatted and parsed with Intl in the page's locale.

Agent actions

Runs agent.snapshot() from @ui-sdk/react/agent on the live preview above.