Skip to content
Projects Vue.js Projects
Vue Masked Input

Vue Masked Input

Simple masked input component for Vuejs

4.9K viewsAdded Jan 18, 2019

Masked input component for Vue.js

Install

npm

npm install vue-masked-input --save

Usage

Use it with v-model just like a native html input with the mask attribute:

<masked-input v-model="date" mask="11/11/1111" placeholder="dd/mm/yyyy" />

Placeholder character

<masked-input v-model="phone" mask="\+\1 (111) 111-1111" placeholder-char="-" placeholder="Phone number" type="tel" />

Custom mask object

<masked-input
  v-model="custom"
  placeholder="Custom"
  :mask="{
    pattern: 'VVVV',
    formatCharacters: {
      'V': {
        validate: char => /[a-jA-J]/.test(char),
        transform: char => char.toUpperCase(),
      },
    },
  }"
/>

Vue.js Projects

A hand-picked collection of projects made with Vue.js: UI components, input elements, apps, plugins, examples and frameworks.

Newsletter

Get the best new Vue projects in your inbox.

© 2026 vuejsprojects.com