77[ ![ Codecov] ( https://img.shields.io/codecov/c/github/kevinongko/vue-numeric.svg )] ( https://codecov.io/gh/kevinongko/vue-numeric )
88[ ![ npm] ( https://img.shields.io/npm/l/vue-numeric.svg )] ( http://opensource.org/licenses/MIT )
99
10- Input field component to display currency value based on [ Vue] ( https://vuejs.org/ ) .
10+ Input field component to display a formatted currency value based on [ Vue] ( https://vuejs.org/ ) .
1111
1212[ Live Demo] ( https://kevinongko.github.io/vue-numeric/ )
1313
14- ` Works with Vue 2.* `
14+ ** Works with Vue 2.***
1515
1616## Installation
1717
@@ -66,7 +66,6 @@ Vue.use(VueNumeric)
6666import VueNumeric from 'vue-numeric'
6767
6868export default {
69-
7069 name: 'App',
7170
7271 components: {
@@ -78,48 +77,49 @@ export default {
7877 }),
7978}
8079</script>
81-
8280```
8381
84- ### Currency prefix
82+ ### Currency symbol
8583
86- adding currency prefix to the input by using ` currency ` props .
84+ Set the ` currency ` prop to add a currency symbol within the input .
8785
8886``` vue
8987<vue-numeric currency="$"></vue-numeric>
9088```
9189
9290### Minimum & maximum constraint
9391
94- Limit minimum and maximum input by using ` min, max ` props.
92+ Limit the minimum and maximum value by using ` min ` and ` max ` props.
9593
96- - ` min ` default to ` 0 ` .
97- - ` min, max ` accept ` String ` and ` Number ` .
94+ - ` min ` defaults to ` 0 ` .
95+ - ` min ` and ` max ` accept ` String ` or ` Number ` values .
9896
9997``` vue
10098<vue-numeric min="2000" v-bind:max="10000"></vue-numeric>
10199```
102100
103- ### Disable/enable minus value
104- - ` minus ` default to ` false ` .
101+ ### Disable/enable negative values
102+
103+ ` minus ` defaults to ` false ` (no negative numbers).
105104
106105``` vue
107106<vue-numeric v-bind:minus="false"></vue-numeric>
108107```
109108
110- ### Enable decimal value
111- By default the decimal value is disabled, to use decimal value add ` precision ` props.
112- - ` precision ` accept ` String ` and ` Number ` numeric value.
109+ ### Enable decimal precision
110+
111+ By default the decimal value is disabled. To use decimals in the value, add the ` precision ` prop.
112+ - ` precision ` accept a ` String ` or ` Number ` numeric value.
113113
114114``` vue
115115<vue-numeric v-bind:precision="2"></vue-numeric>
116116```
117117
118- ### Thousand separator
118+ ### Thousands separator
119119- Default thousand separator's symbol is ` , ` .
120- - Use ` separator ` props to change separator's symbol .
121- - ` separator ` only accept either ` , ` or ` . ` value .
122- - When using ` . ` separator symbol, to input decimal value use ` , ` and vice versa.
120+ - Use the ` separator ` prop to change the thousands separator .
121+ - ` separator ` only accepts ` , ` or ` . ` .
122+ - When using the ` . ` as a separator, use a ` , ` for a decimal and vice versa.
123123
124124``` vue
125125<vue-numeric separator="."></vue-numeric>
@@ -134,14 +134,14 @@ By default the decimal value is disabled, to use decimal value add `precision` p
134134| Props| Description| Required| Type| Default|
135135| -----| -----------| --------| ----| -------|
136136| currency| Currency prefix| false| String| -|
137- | currency-symbol-position| Position for the symbol (accepted values: ` prefix ` or ` suffix ` )| false| String| ' prefix' |
137+ | currency-symbol-position| Position of the symbol (accepted values: ` prefix ` or ` suffix ` )| false| String| ` prefix ` |
138138| max| Maximum value allowed| false| Number, String| -|
139139| min| Minimum value allowed| false| Number, String| 0|
140- | minus| Enable/disable minus value | false| Boolean| false|
140+ | minus| Enable/disable negative values | false| Boolean| ` false ` |
141141| placeholder| Input placeholder| false| String| -|
142142| precision| Number of decimals| false| Number, String| -|
143- | separator| Thousand separator type ( accept either ` . ` or ` , ` )| false| String| , |
144- | read-only| Hide input field and show the value in text| false| Boolean| false|
143+ | separator| Thousand separator symbol (accepts either ` . ` or ` , ` )| false| String| ` , ` |
144+ | read-only| Hide input field and show the value as text| false| Boolean| false|
145145| read-only-class| Class for read-only element| false| String| ''|
146146
147147## License
0 commit comments