Basic number field
For AI Agents
Hand your agent this brief or the ReUI MCP, not a screenshot. Free to install.
Best for: The default size with minus at the start, plus at the end and the value centered between them
When to use
- Quantities, amounts and counts stepped up or down by buttons inside a min and max range
- Compact numeric settings whose label scrubs the value when dragged sideways
- Validated amounts in a React Hook Form form, checked by a zod schema with the error shown below
When not to use
- A value checked against a schema with an error shown under the control: use the Number Field Form Validation example
- Free text such as a name, an email or an order ID, with nothing to step: use the Input component
- A full plans comparison with tier prices and a seat count to adjust: use the Pricing blocks
- A record entry page with many controls, such as a product with price and stock: use the Form blocks
Agent notes
onValueChangereceives null when the input is cleared, so type a controlledvalueas a number or null- Set
aria-invalidonNumberFieldGroupto turn its border destructive; a shadcnFieldmarked invalid only recolors text - An outside label must point
htmlForat theidpassed toNumberField, which Base UI sets on the input
https://reui.io/components/number-field/c-number-field-1.mdget_example("c-number-field-1")npx shadcn@latest add @reui/c-number-field-1Shadcn Components in Number Field Default Size
About Shadcn Number Field Default Size
Basic number field. Built with the Number Field component. A free, open source shadcn number field example you can install with npx shadcn@latest add @reui/c-number-field-1 and edit as your own code.
What You Can Build With Shadcn Number Field Default Size
- Composes Number Field, so it drops into any project already using those components.
- Install it with the shadcn CLI: npx shadcn@latest add @reui/c-number-field-1
- Open source and free, with the full source on this page to copy or adapt.
More Shadcn Number Field Examples
- Small Size Basic number field
- Large Size Basic number field
- Buttons on Right Number field with buttons on right
- Spinner Buttons Number field with spinner buttons
- Form Validation Number field in form
Related Shadcn Component Categories
Open-source shadcn pagination components for table pagination, search results, and content archives.
Open-source shadcn phone input components for international signup, contact forms, and country codes.
Open-source shadcn popover components for inline settings, contextual actions, and lightweight overlays.
Open-source shadcn progress components for upload progress, goal tracking, and setup steps.
Open-source shadcn questionnaire components for onboarding surveys, multi-step question flows, and guided feedback.
Open-source shadcn radio group components for single-choice forms, plan selection, and settings preferences.
Frequently Asked Questions
When should I use Shadcn Number Field Default Size?
Use it for the default size with minus at the start, plus at the end and the value centered between them.
Shadcn Number Field as a whole fits:
- Quantities, amounts and counts stepped up or down by buttons inside a min and max range
- Compact numeric settings whose label scrubs the value when dragged sideways
- Validated amounts in a React Hook Form form, checked by a zod schema with the error shown below
For a value checked against a schema with an error shown under the control, use the Number Field Form Validation example. For free text such as a name, an email or an order ID, with nothing to step, use the Input component. For a full plans comparison with tier prices and a seat count to adjust, use the Pricing blocks. For a record entry page with many controls, such as a product with price and stock, use the Form blocks.
How do I install Shadcn Number Field Default Size?
Is Shadcn Number Field Default Size free to use?
Which components does Shadcn Number Field Default Size use?
Start building with ReUI Pro today.
Every Pro block, every style, and every future addition, with one license for unlimited projects.
From $249, once. Lifetime updates.