@ssibrahimbas/v-mask
v1.0.0
Published
mask directive for vue3
Downloads
2,649
Maintainers
Readme
What Is It?
v-mask is a directive for Vue.js 3 that allows you to mask input fields.
This package inspired by vue-the-mask
Installation
npm install @ssibrahimbas/v-maskUsage
import { createApp } from "vue";
import VMask from "@ssibrahimbas/v-mask";
const app = createApp(App).use(VMask).mount("#app");<input v-mask="'###-##-##'" />### Tokens
| Token | Description |
| ----- | -------------------------- |
| # | Digit |
| X | Any character |
| S | Any text character |
| A | Any uppercase character |
| a | Any lowercase character |
| ! | Any alphanumeric character |
Options
| Option | Type | Default | Description |
| ------ | -------- | ------- | ------------------------------- |
| mask | String | '' | Mask to be applied to the input |
