mask-input-dynamic
TypeScript icon, indicating that this package has built-in type declarations

1.1.6 • Public • Published

mask-input-dynamic

npm version npm downloads

Create your own mask simple and fast! Use styles pre-defined and more.

Installing

npm install mask-input-dynamic
yarn add mask-input-dynamic

Usage

import { mask } from "mask-input-dynamic";

function InputFone(props) {
    const [fone, setFone] = useState('')

    return (
        <input type="text" onChange={(e) => setFone(mask(e.currentTarget.value, {style:'fone'}))} value={fone} />
    )
}

Properties

Name Type Description
value {String} Value for mask
pattern {String} Enter with your mask with # pattern
style {fone/cpf} Chose one style pre-defined for your mask

Readme

Keywords

Package Sidebar

Install

npm i mask-input-dynamic

Weekly Downloads

12

Version

1.1.6

License

MIT

Unpacked Size

5.04 kB

Total Files

7

Last publish

Collaborators

  • imatheus.max