import { NumberInput } from "@wfp/react"; () => { return ( <NumberInput helperText="Optional helperText" labelText="The labelText" name="inputname" pattern="[0-9]+([.,][0-9]+)?" step={0.01} /> ); };
string |number
The maximum value.
The minimum value.
number
Specify how much the valus should increase/decrease upon clicking on up/down button
boolean
true to allow empty string.
true
Specify if the control should be disabled, or not
string
Specify a custom id for the input
id
Provide text that is used alongside the control label for additional help
Specify whether you want the underlying label to be visually hidden
Specify whether you want the up/down buttons to be hidden
true to use the light version.
Specify the regular expression that the value should match using the html pattern attribute
(evt?: any,value?: number,direction?: string) => void
The new value is available in 'imaginaryTarget.value' i.e. to get the value: evt.imaginaryTarget.value or in th second argument provided to the onChange prop
(evt?: MouseEvent<Element,MouseEvent>,value?: number,direction?: string) => void
Provide an optional function to be called when the up/down button is clicked
Specify the value of the input, if undefined or null the value is empty
ReactNode
Provide the text that will be read by a screen reader when visiting this control
Provide a custom className that is applied directly to the underlying <textarea> node
Provide a custom className that is applied directly to the underlying <input> or <textarea> node
any
Specify whether the control is currently invalid. Either a boolean in combination with invalidText or an object( eg. { message: "Message", …otherErrorProperties }) can be passed.
invalidText
object
Provide the text that is displayed when the control is in an invalid state
Provide the content that will be shown in addition to the label (e.g. units, currency, etc.) This content will be placed after the label
Specify the placeholder attribute for the input
Provide a name for the control
Specify if the control is required (sets aria-invalid as well)
If the input is read-only, the user cannot change its value but focus and tabIndex are still applied (sets aria-readonly as well)
Renders the input as inline element for horizontal forms
Additional helper in front of the input, e.g. a currency symbol (sets aria-describedby as well)
Additional helper behind the input, e.g. a currency symbol (sets aria-describedby as well)
AddonBeforeAddonAfterLabelHelperTextInlineErrorMessage
Supports replacement components