/Vue2CurrencyInput

Primary LanguageJavaScriptMIT LicenseMIT

Vue 2 Currency Input

Vue 2.x input component that formats numbers into USD currency as the user types.

Current version Vue.js version

Demo

demo

Install

npm install vue2-currency-input --save

Usage

<script>
import Vue from 'vue';
import CurrencyInput from "vue2-currency-input";

export default Vue.extend({
  name: 'ServeDev',
  components: {
    CurrencyInput
  }
});
</script>

<template>
  <div id="app">
    <currency-input />
  </div>
</template>

Additional Notes

This component only formats to US currency.

It will take a string or number and always returns a float

Released under the MIT License.