Maskito is a collection of libraries, built with TypeScript. It helps you to create an input mask which ensures that users type values according to predefined format.
Core concepts of the libraries are simple but they provide flexible API to set any format you wish: numbers, phone, date, credit card number etc.
Why Maskito?
- Maskito supports all user’s interactions with text fields: basic typing and deleting via keyboard, pasting, dropping text inside with a pointer, browser autofill, predictive text from mobile native keyboard.
- Maskito is robust. The whole project is developed with
strict
TypeScript mode. Our code is covered by hundreds of Cypress tests. - Server Side Rendering and Shadow DOM support.
- You can use it with
HTMLInputElement
/ HTMLTextAreaElement
or even with [contenteditable]
element. - Maskito core is zero-dependency package. You can mask input in your vanilla JavaScript project. However, we have separate packages for Angular , React and Vue as well.
- Maskito includes optional framework-agnostic package with configurable ready-to-use masks.
No textfield with invalid value! Use Maskito. Mask it!