Skip to content

Latest commit

 

History

History
53 lines (37 loc) · 1.04 KB

README.md

File metadata and controls

53 lines (37 loc) · 1.04 KB

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

If the string is empty a 0.00 will be returned

Released under the MIT License.