NumberInput
A number input in a web form. We have a separate component from the browser base so we can style it.
Properties
defaultValue {number}
- Same as React <input defaultValue= >.
disabled true|false
- Same as React <input disabled= >. Also adds a hidden input element with the same name so form submissions work.
id {string}
- The DOM id attribute value to use for the underlying<input> element.
max {number}
- Maximum value.
min {number}
- Minimum value.
name {string}
- The DOM name attribute value to use for the underlying<input> element.
onChange {function}
- Same as React <input onChange= >.
step {number}
- Steps to increase and decrease by.
value {number}
- The value to put in the input.
Usage
import NumberInput from 'grommet/components/NumberInput';
<NumberInput value={10}
onChange={...} />