Simple zero-dependency input mask for Vue, Svelte, Alpine.js and vanilla JS.
Maska is a lightweight library designed for input masking and formatting. It offers various features like no dependencies, support for different frameworks like Vue, Alpine.js, and Svelte, custom tokens with modifiers, dynamic masks, and more. In version 3, Maska introduces integrations with Alpine.js and Svelte, a number mask mode, and simplified directive format among other improvements.
To install Maska, you can use npm with the following command:
npm install maska
Or you can include the script directly in your HTML file from a CDN:
<script src="https://cdn.jsdelivr.net/npm/maska/dist/maska.umd.min.js"></script>
Check the official documentation for more detailed installation instructions.
Maska is a versatile input masking library with a small footprint and support for popular frameworks like Vue, Alpine.js, and Svelte. It offers various features like custom tokens, number mask mode, and dynamic masks. Version 3 brings integrations with Alpine.js and Svelte, a simplified directive format, and other improvements, making it a convenient tool for input formatting in web development.