vue-input-facade is a lightweight and dependency-free library for adding input masking capabilities to Vue applications. It offers a versatile approach to formatting user input through directives, components, or a programmatic API. The library prioritizes minimal overhead and efficient performance by avoiding external dependencies. The current stable version, 2.2.0, is designed for Vue 2 projects. A significant upgrade to version 3.0.0 is currently in beta, introducing full compatibility with Vue 3 and modernizing the import system to ES Module-style named imports. Development for v3 is ongoing, alongside maintenance updates for v2, indicating an active, albeit deliberate, release cadence. Its primary distinction within the Vue ecosystem is its compact size and singular focus on robust input masking without bloat.
npm install vue-input-facadeVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates registering and using the `v-facade` directive in a Vue 3 application to apply various input masks like phone numbers, credit card numbers, and currency formats to input fields.
For Vue 2 projects, ensure `"vue-input-facade": "^2.0.0"` in `package.json`. For Vue 3, update your project's Vue version to v3 and install `vue-input-facade@next`.
Replace `import Facade from 'vue-input-facade'` with `import { vFacade, InputFacade, Facade } from 'vue-input-facade'` for specific exports. Also, update any `require()` calls to `import` statements.Migrate any filter-based masking logic to use computed properties or methods. The directive and component approaches remain available for input masking.
Remove `Vue.filter` registrations and adapt your masking logic to use `v-facade` directive, `<InputFacade>` component, or computed properties/methods.
Verify that your installed `vue-input-facade` version matches your Vue version (v2.x.x for Vue 2, v3.x.x for Vue 3). Ensure the package is correctly listed in `package.json`.
Update your import statements from `import Facade from 'vue-input-facade'` to specific named imports like `import { vFacade } from 'vue-input-facade'`.No dependency data recorded yet.