vue-currency-input
Version:
Easy input of currency formatted numbers for Vue.js.
32 lines (20 loc) • 2.25 kB
Markdown
[](https://codecov.io/gh/dm4t2/vue-currency-input)
[](https://www.npmjs.com/package/vue-currency-input)
[](https://www.npmjs.com/package/vue-currency-input)
[](https://bundlephobia.com/result?p=vue-currency-input)
[](https://github.com/dm4t2/vue-currency-input/blob/main/LICENSE)
# Vue Currency Input
[](https://dm4t2.github.io/vue-currency-input)
Vue Currency Input allows an easy input of currency formatted numbers based on the [ECMAScript Internationalization API (Intl.NumberFormat)](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat).
Built on top of the [Vue Composition API](https://v3.vuejs.org/guide/composition-api-introduction.html), it enables you to decorate _any_ input component with currency format capabilities.
## Features
- Turns the input component of your favorite framework (for example [Vuetify](https://vuetifyjs.com/en/components/text-fields/), [Quasar](https://quasar.dev/vue-components/input) or [Element Plus](https://element-plus.org/en-US/component/input.html)) into a currency input field
- Supports both Vue 2 _and_ Vue 3
- Built on standards: Ensures the right locale dependent formatting by using [Intl.NumberFormat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat)
- Unobtrusive input by hiding the formatting on focus
- Built-in value range validation
## Getting started
Please read the [guide](https://dm4t2.github.io/vue-currency-input/guide) to get started or check out the [playground](https://dm4t2.github.io/vue-currency-input/playground) to see it in action.
## Support me
If you find my work helpful, or you want to support the development, star the repo or buy me a coffee:
[](https://ko-fi.com/D1D6SXEA)