v-money is a lightweight, dependency-free Vue.js library that provides currency input masking capabilities, functioning both as a component (`<money>`) and a directive (`v-money`). It enables users to format currency inputs with specified decimal, thousands separators, prefixes, and suffixes, and supports features like copy/paste and mobile compatibility. The current and final stable version is 0.8.1, published over 9 years ago, and the library is no longer actively maintained. For Vue 3 applications, developers should use `v-money3`, which is a direct successor designed to address Vue 3 compatibility and continues active development. v-money was a popular choice for Vue 2 projects needing simple, flexible currency formatting without external dependencies.
npm install v-moneyVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to use the `money` component to create a currency input field with custom formatting, binding it to a reactive `price` value in a Vue 2 (or composition API compatible) setup.
Migrate to `v-money3` (https://github.com/jonathanpmartins/v-money3) which is the spiritual successor built specifically for Vue 3 applications. `v-money3` is actively maintained.
Change `v-model="price"` to `v-model.lazy="price"` on the input element where the `v-money` directive is applied.
If you require the `masked` property functionality (i.e., having the raw unmasked number in your model), use the `<money>` component instead of the `v-money` directive.
For new projects or existing projects considering a Vue 3 migration, transition to `v-money3`. For legacy Vue 2 projects, be aware of the lack of ongoing support and consider potential long-term risks.
No dependency data recorded yet.