Simple input mask for brazilian zipcode.
npm install react-simple-cep-maskSimple \ wrapper to mask the value with a BR zipcode mask. \
It will apply all the props given to it, to an input field, enabling any customization.
Componente para adicionar máscara de cep sem dependências.
Os props são copiados diretamente para um , permitindo customização.
``shell`
$ yarn add react-simple-cep-mask
`JSX
import React, { useState } from "react";
import ReactDOM from "react-dom";
import Cep from "react-simple-cep-mask";
const App = () => {
const [cep, setCep] = useState("");
return (
<>
onChange={ (cep) => setCep(cep) }
/>
ReactDOM.render(
`
`JSX
import React, { useState } from "react";
import ReactDOM from "react-dom";
import Cep from "react-simple-cep-mask";
const App = () => {
const [cep, setCep] = useState("");
return (
<>
onChange={ (cep) => setCep(cep) }
className="someClass"
placeholder="Digite seu cep"
/>
ReactDOM.render(
``

- MIT license
- Copyright 2015 © FVCproductions.