InputPercentv9.3.0 Edit this page
Standard percent wrapper composing the standard NerdWallet formatted input component. There are some props that we don't allow the consumers to override (like type) on the underlying Formatted (and thus Input) component. See FormattedInput for the base formatted input component, as well as reference to the underlying react-number-format lib. react-number-format provides numerous props to override the formatted input if desired (like format and mask). InputPercent has an opinionated design, and some of those props are not surfaced in InputPercent.propTypes.
Flag to enable the user to be able to supply a '-' to indicate the value should be negative.
The default label associated with the input field. Should always be supplied to meet accessibility best practices.
String to override the default placeholder text, which is "%".
In general all input components should be controlled, which means their value is passed into the component, and state is maintained within the React component as opposed to using refs from the DOM. Although generally required, default to ''.