InputPhone

Storybook
GitHub
Loading...

Usage

import InputPhone from '@nerdwallet/react-formatted-input/input-phone';
<InputPhone />

Loading examples...

<InputPhone>

label

string

The default label associated with the input field. Should always be supplied to meet accessibility best practices.

Default

'Phone number'

placeholder

string

String to override the default placeholder text, which is "+1".

Default

'+1'

value

string | number

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 ''.

Default

''

See Also