0.9.1 • Published 10 months ago

@opentf/vue-input-mask v0.9.1

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

Vue Input Mask

⚡ by OPEN TECH FOUNDATION

npm.io

Build

The input mask directive for Vue.js.

Demo

Features

  • Simple API

  • Lightweight ~1.5 KB Gzipped

  • RegExp Support

  • Custom tokens

  • Get raw/unmasked values via callback fn

Installation

Using npm

npm install @opentf/vue-input-mask

Using Yarn

yarn add @opentf/vue-input-mask

Using pnpm

pnpm add @opentf/vue-input-mask

Usage

<script setup>
import { vMask } from "@opentf/vue-input-mask";
</script>

<template>
  <input v-mask="{ mask: '#####' }" />
</template>
Default Tokens:

#  - Number only, [0-9]
$  - Char only, [A-Z, a-z]
*  - Number or Char, [a-z, A-Z, 0-9]
A  - Uppercase char [A-Z], transform: (c) => c.toLocaleUpperCase()
a  - Lowercase char [a-z], transform: (c) => c.toLocaleLowerCase()
\\ - Escape token, eg: \\$
{} - Regular expression, eg: {[A-F]}

Documentation

Please visit https://vue-input-mask.pages.dev to get started.

License

Copyright (c) Thanga Ganapathy (MIT License).

0.9.0

10 months ago

0.9.1

10 months ago

0.8.2

1 year ago

0.8.1

1 year ago

0.8.0

1 year ago

0.7.0

1 year ago

0.6.0

1 year ago

0.5.0

1 year ago

0.4.0

1 year ago

0.3.0

1 year ago

0.2.0

1 year ago

0.1.0

1 year ago