All Projects → niksmr → Vue Masked Input

niksmr / Vue Masked Input

Licence: mit
Masked input component for Vue.js

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Vue Masked Input

Kendo Angular
Issue tracker - Kendo UI for Angular
Stars: ✭ 352 (-18.71%)
Mutual labels:  ui-components
Formsfx
A framework for easily creating forms for a JavaFX UI.
Stars: ✭ 380 (-12.24%)
Mutual labels:  ui-components
Realm Android Adapters
Adapters for combining Realm Java with Android UI components and framework classes
Stars: ✭ 410 (-5.31%)
Mutual labels:  ui-components
Rimble Ui
React components that implement Rimble's Design System.
Stars: ✭ 357 (-17.55%)
Mutual labels:  ui-components
Radialmenu
A highly customizable radial menu that's very easy to setup.
Stars: ✭ 371 (-14.32%)
Mutual labels:  ui-components
Daisyui
⭐️ ⭐️ ⭐️ ⭐️ ⭐️  Tailwind Components
Stars: ✭ 382 (-11.78%)
Mutual labels:  ui-components
Swiftreorder
Easy UITableView drag-and-drop cell reordering
Stars: ✭ 340 (-21.48%)
Mutual labels:  ui-components
Flying Focus
UI concept
Stars: ✭ 428 (-1.15%)
Mutual labels:  ui-components
Svelte Materialify
A Material UI Design Component library for Svelte heavily inspired by vuetify.
Stars: ✭ 351 (-18.94%)
Mutual labels:  ui-components
Chart Race React
📊 Seamless bar chart race component for React.
Stars: ✭ 406 (-6.24%)
Mutual labels:  ui-components
Flutter Settings Ui
Create native settings for Flutter app in a minutes.
Stars: ✭ 363 (-16.17%)
Mutual labels:  ui-components
Overwatch Ui
A UI library of Overwatch, built with Vue.js
Stars: ✭ 365 (-15.7%)
Mutual labels:  ui-components
Accessible components
Listing of accessible components & patterns
Stars: ✭ 393 (-9.24%)
Mutual labels:  ui-components
Coreui Free Laravel Admin Template
CoreUI Free Laravel Bootstrap Admin Template
Stars: ✭ 353 (-18.48%)
Mutual labels:  ui-components
React Chat Ui
🙊 A library of React components for building chat UI's.
Stars: ✭ 424 (-2.08%)
Mutual labels:  ui-components
Airframe React
Free Open Source High Quality Dashboard based on Bootstrap 4 & React 16: http://dashboards.webkom.co/react/airframe
Stars: ✭ 3,659 (+745.03%)
Mutual labels:  ui-components
Flutter badges
A flutter package for creating badges.
Stars: ✭ 391 (-9.7%)
Mutual labels:  ui-components
Searchkit
GraphQL API & React UI components for Elasticsearch. The easiest way to build a great search experience
Stars: ✭ 4,338 (+901.85%)
Mutual labels:  ui-components
Vue Multipane
Resizable split panes for Vue.js.
Stars: ✭ 427 (-1.39%)
Mutual labels:  ui-components
Drawer Behavior
Drawer behavior is a library that provide an extra behavior on drawer, such as, move view or scaling view's height while drawer on slide.
Stars: ✭ 394 (-9.01%)
Mutual labels:  ui-components

Vue Masked Input

Dead simple masked input component for Vue.js 2.X. Based on inputmask-core.

Live Demo

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" />

The following format characters define editable parts of the mask (see inputmask-core):

  • 1 - number
  • a - letter
  • A - letter, forced to upper case when entered
  • * - alphanumeric
  • # - alphanumeric, forced to upper case when entered
  • + - any character

Static characters

If you need to include one of these characters as a static part of the mask, you can escape them with a preceding backslash:

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

Raw input

You can also get a raw user input text if you want. Instead of using v-model you might need second argument of the input event:

<masked-input mask="\+\1 (111) 1111-11" placeholder="Phone" @input="rawVal = arguments[1]" />

Placeholder character

Placeholder character is customizable by placeholder-char attribute:

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

Custom mask object

You can use your own mask options object, it will be passed to the inputmask-core constructor:

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

Known issues/TODO

  • Cut in mobile Chrome
  • Cyrillic chars are not supported in mobile Chrome
  • Backspace problems in mobile Chrome

Found more? It's open for feedback and pull requests

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].