A lightweight and flexible vanilla React masked input component built with IMask.
The npm package is located in the lib/ directory. See lib/README.md for full documentation.
npm install mfk-mask-inputimport { InputMask } from "mfk-mask-input";
<InputMask
mask="(000) 000-0000"
placeholder="Phone number"
onChange={(e) => console.log(e.maskedValue, e.unmaskedValue)}
/>;A live demo application is available in the demo/ directory. To run it:
cd demo
npm install
npm run devmfk-mask-input/
├── lib/ # NPM package source
├── demo/ # Demo application
├── LICENSE
├── CHANGELOG.md
└── README.md
cd lib
npm install
npm run buildcd demo
npm install
npm run devFor complete API documentation, usage examples, and TypeScript support, see:
Contributions are welcome! Please feel free to submit a Pull Request.
MIT - See LICENSE for details.
- IMask: https://imask.js.org/