Picto Free Tailwind CSS Portfolio Website Template
Picto is a well-designed portfolio template perfect for developers, freelancers, and creative professionals who want to present their work with elegan…
Maska is a small and customizable input mask component for Vanilla JavaScript and Vue.js framework.
Install and Download:
# NPM $ npm install maska --save
Import the Maska library
// ES Module
import { MaskInput } from "maska"
// Browser
Define the mask rules in the data-mask attribute. All default tokens:
Initialize the plugin on the input and done
new MaskInput("[data-maska]")
Customize the mask tokens
Available mask options
Available input options
new MaskInput("input", {
mask: "#-#",
reversed: true,
onMaska: (detail) => console.log(detail.completed),
postProcess: (value) => value.slice(0, 5),
preProcess: (value) => { return value.toUpperCase(); },
})
Destroy the input mask plugin
var myMask = new MaskInput("[data-maska]")
myMask.destroy();
Chrome, MS Edge, Firefox, Opera, Safari, IE8+
javascript, vue, input, devstoc freebies, input mask, mask, vue js components