@ukchukx/vue-money-input
v1.0.0
Published
A Vue component for inputting Naira-formatted amounts.
Downloads
1
Readme
vue-money-input
A Vue component for inputting monetary amounts.
Installation
npm i -S @ukchukx/vue-money-input
Browser
<script type="text/javascript" src="https://unpkg.com/vue"></script>
<script type="text/javascript" src="https://unpkg.com/@ukchukx/vue-money-input"></script>
<script type="text/javascript">
Vue.use(MoneyInput);
</script>
Module
import MoneyInput from '@ukchukx/vue-money-input';
Usage
Once installed, it can be used in a template as simply as:
<money-input :initial-amount="initialAmount" v-model="amount" />
Or styled as a Bootstrap input:
<money-input class="form-control" :initial-amount="initialAmount" v-model="amount" />
The currency prefix can be changed:
<money-input currency-symbol="$" :initial-amount="initialAmount" v-model="amount" />