9ssi7 / v-mask

mask directive for vue3

Home Page:https://www.npmjs.com/package/@ssibrahimbas/v-mask

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool


@ssibrahimbas/v-mask

Mask for Vue.js 3

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-mask

Usage

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

About

mask directive for vue3

https://www.npmjs.com/package/@ssibrahimbas/v-mask

License:MIT License


Languages

Language:TypeScript 91.2%Language:JavaScript 3.9%Language:HTML 3.2%Language:Vue 1.6%