Summary
Replaces the NumberInput component.
This is the place to gather ideas, measure interest and discuss the API and implementation details of the NumberField component and hook.
Anatomy
<NumberField>
<NumberField.Group>
<NumberField.Input />
<NumberField.Decrement />
<NumberField.Increment />
<NumberField.Scrubber />
</NumberField.Group>
</NumberField>
Root
Rendered element: div
| prop | type | default | description |
| defaultValue | number | | |
| id | | | |
| min | number | | |
| max | number | | |
| step | number | 1 | |
| largeStep | number | 10 | |
| required | boolean | | |
| disabled | boolean | | |
| invalid | boolean | | |
| autoFocus | boolean | | |
| children | | | |
| readOnly | boolean | | |
| name | string | | |
| value | number | | |
| onChange | function | | |
| format | Intl.NumberFormatOptions | | |
Other props (unnamed):
- Ability to scrub the input with the
wheel
- Locale for
format
Group
Rendered element: div
All div attrs.
Input
Rendered element: <input type="text" />
All input attrs.
Decrement
Rendered element: button
All button attrs.
Increment
Rendered element: button
All button attrs.
Scrubber
Rendered element: span
All span attrs.
Benchmarks
Examples
No response
Motivation
No response
Search keywords: number field, number input
Summary
Replaces the
NumberInputcomponent.This is the place to gather ideas, measure interest and discuss the API and implementation details of the
NumberFieldcomponent and hook.Anatomy
Root
Rendered element:
divOther props (unnamed):
wheelformatGroup
Rendered element:
divAll
divattrs.Input
Rendered element:
<input type="text" />All
inputattrs.Decrement
Rendered element:
buttonAll
buttonattrs.Increment
Rendered element:
buttonAll
buttonattrs.Scrubber
Rendered element:
spanAll
spanattrs.Benchmarks
Examples
No response
Motivation
No response
Search keywords: number field, number input