The Masked Input component works similarly to the regular Input. However, you are required to provide a mask or a collection of masks.

Basic example:

<MaskedInput
placeholder="Type your phone number"
value={this.state.phoneNumber}
onChange={e => {
this.setState({ phoneNumber: e })
}}
mask="(99) 99999-9999"
/>

<MaskedInput
placeholder="Type your document number"
value={this.state.CPF_CNPJ}
onChange={e => {
this.setState({ CPF_CNPJ: e })
}}
mask={[
"999.999.999-99",
"99.999.999/9999-99"
]}
/>

Param

Input Properties

Has No Children

Hierarchy