Hextech UI

Number Field

Live example

Number Field

Installation

Terminal
npx shadcn@latest add https://hextech-ui.vercel.app/r/number-field.json

API reference

These are the main Number Field options. See the exported TypeScript types for inherited native or primitive props.

PropTypeDefault
labelstring (required)—
value / defaultValuenumber | null—
min / max / stepnumberBase UI defaults

Numeric state

Use value and onValueChange for controlled editing, or defaultValue for local state. Set bounds with min and max and choose step for increment buttons. Native form submission uses name. The visible label remains 8px above the control.