Installations
npm install vue-numeric
Developer Guide
Typescript
No
Module System
CommonJS
Node Version
16.14.2
NPM Version
8.5.0
Releases
Contributors
Unable to fetch Contributors
Languages
JavaScript (61.96%)
Vue (38.04%)
Love this project? Help keep it running — sponsor us today! 🚀
Developer
Download Statistics
Total Downloads
2,777,627
Last Day
78
Last Week
78
Last Month
21,762
Last Year
384,303
GitHub Statistics
461 Stars
191 Commits
119 Forks
14 Watching
10 Branches
16 Contributors
Bundle Size
10.13 kB
Minified
3.32 kB
Minified + Gzipped
Package Meta Information
Latest Version
2.5.1
Package Id
vue-numeric@2.5.1
Unpacked Size
45.67 kB
Size
11.95 kB
File Count
14
NPM Version
8.5.0
Node Version
16.14.2
Publised On
11 Jun 2023
Total Downloads
Cumulative downloads
Total Downloads
2,777,627
Last day
0%
78
Compared to previous day
Last week
-98.3%
78
Compared to previous week
Last month
-11.5%
21,762
Compared to previous month
Last year
-13.3%
384,303
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
1
Dev Dependencies
28
vue-numeric
Input field component to display a formatted currency value based on Vue.
Works with Vue 2.*
Installation
Install via CDN
1<script src="https://unpkg.com/accounting-js"></script> 2<script src="https://unpkg.com/vue"></script> 3<script src="https://unpkg.com/vue-numeric"></script> 4 5<script> 6 Vue.use(VueNumeric.default) 7</script>
Install via NPM
1$ npm install vue-numeric --save
Register as Component
1import Vue from 'vue' 2import VueNumeric from 'vue-numeric' 3 4export default { 5 name: 'App', 6 7 components: { 8 VueNumeric 9 } 10}
Register as Plugin
1import Vue from 'vue' 2import VueNumeric from 'vue-numeric' 3 4Vue.use(VueNumeric)
Usage
Quick example
1<template> 2 <vue-numeric currency="$" separator="," v-model="price"></vue-numeric> 3</template> 4 5<script> 6import VueNumeric from 'vue-numeric' 7 8export default { 9 name: 'App', 10 11 components: { 12 VueNumeric 13 }, 14 15 data: () => ({ 16 price: '' 17 }), 18} 19</script>
Currency symbol
Set the currency
prop to add a currency symbol within the input.
1<vue-numeric currency="$"></vue-numeric>
Minimum & maximum constraint
Limit the minimum and maximum value by using min
and max
props.
min
defaults to0
.min
andmax
acceptString
orNumber
values.
1<vue-numeric v-bind:min="2000" v-bind:max="10000"></vue-numeric>
Disable/enable negative values
minus
defaults to false
(no negative numbers).
1<vue-numeric v-bind:minus="false"></vue-numeric>
Enable decimal precision
By default the decimal value is disabled. To use decimals in the value, add the precision
prop.
precision
accept aString
orNumber
numeric value.
1<vue-numeric v-bind:precision="2"></vue-numeric>
Thousands separator
- Default thousand separator's symbol is
,
. - Use the
separator
prop to change the thousands separator. separator
only acceptsspace
,,
or.
.- When using the
.
orspace
as thousand separator, the decimal separator will be,
.
1<vue-numeric separator="."></vue-numeric>
Input placeholder when empty
1<vue-numeric placeholder="only number allowed"></vue-numeric>
Value when empty
By default, when you clean the input the value is set to 0
. You can change this value to fit your needs.
1<vue-numeric :empty-value="1"></vue-numeric>
Output Type
By default the value emitted for the input event is of type Number
. However you may choose to get a String
instead
by setting the property output-type
to String
.
1<vue-numeric output-type="String"></vue-numeric>
Props
Props | Description | Required | Type | Default |
---|---|---|---|---|
currency | Currency prefix | false | String | - |
currency-symbol-position | Position of the symbol (accepted values: prefix or suffix ) | false | String | prefix |
max | Maximum value allowed | false | Number | 9007199254740991 |
min | Minimum value allowed | false | Number | -9007199254740991 |
minus | Enable/disable negative values | false | Boolean | false |
placeholder | Input placeholder | false | String | - |
empty-value | Value when input is empty | false | Number | 0 |
output-type | Output Type for input event | false | String | Number |
precision | Number of decimals | false | Number | - |
separator | Thousand separator symbol (accepts space , . or , ) | false | String | , |
decimal-separator | Custom decimal separator | false | String | - |
thousand-separator | Custom thousand separator | false | String | - |
read-only | Hide input field and show the value as text | false | Boolean | false |
read-only-class | Class for read-only element | false | String | '' |
allow-clear | Use input type search | false | Boolean | false |
License
Vue-Numeric is open-sourced software licensed under the MIT license
Support
Hello, I'm Kevin the maintainer of this project in my free time (which is getting lessen these days), if this project does help you in any way please consider to support me. Thanks :smiley:
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
Found 7/21 approved changesets -- score normalized to 3
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Warn: no topLevel permission defined: .github/workflows/node.js.yml:1
- Info: no jobLevel write permissions found
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/node.js.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/kevinongko/vue-numeric/node.js.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/node.js.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/kevinongko/vue-numeric/node.js.yml/master?enable=pin
- Warn: npmCommand not pinned by hash: .github/workflows/node.js.yml:30
- Info: 0 out of 2 GitHub-owned GitHubAction dependencies pinned
- Info: 0 out of 1 npmCommand dependencies pinned
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 16 are checked with a SAST tool
Reason
64 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-v88g-cgmw-v5xw
- Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw
- Warn: Project is vulnerable to: GHSA-fwr7-v2mv-hh25
- Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92
- Warn: Project is vulnerable to: GHSA-qwcr-r2fm-qrc7
- Warn: Project is vulnerable to: GHSA-cwfw-4gq5-mrqx
- Warn: Project is vulnerable to: GHSA-g95f-p29q-9xw4
- Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg
- Warn: Project is vulnerable to: GHSA-x9w5-v3q2-3rhw
- Warn: Project is vulnerable to: GHSA-257v-vj4p-3w2h
- Warn: Project is vulnerable to: GHSA-pxg6-pf52-xh8x
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-9vvw-cc9w-f27h
- Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c
- Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq
- Warn: Project is vulnerable to: GHSA-h6ch-v84p-w6p9
- Warn: Project is vulnerable to: GHSA-434g-2637-qmqr
- Warn: Project is vulnerable to: GHSA-49q7-c7j4-3p7m
- Warn: Project is vulnerable to: GHSA-977x-g7h5-7qgw
- Warn: Project is vulnerable to: GHSA-f7q4-pwc6-w24p
- Warn: Project is vulnerable to: GHSA-fc9h-whq2-v747
- Warn: Project is vulnerable to: GHSA-r7qp-cfhv-p84w
- Warn: Project is vulnerable to: GHSA-q9mw-68c2-j6m5
- Warn: Project is vulnerable to: GHSA-4gmj-3p3h-gm8h
- Warn: Project is vulnerable to: GHSA-jchw-25xp-jwwc
- Warn: Project is vulnerable to: GHSA-cxjh-pqwp-8mfp
- Warn: Project is vulnerable to: GHSA-4q6p-r6v2-jvc5
- Warn: Project is vulnerable to: GHSA-qh2h-chj9-jffq
- Warn: Project is vulnerable to: GHSA-7r28-3m3f-r2pr
- Warn: Project is vulnerable to: GHSA-r8j5-h5cx-65gg
- Warn: Project is vulnerable to: GHSA-xxvw-45rp-3mj2
- Warn: Project is vulnerable to: GHSA-2pr6-76vf-7546
- Warn: Project is vulnerable to: GHSA-8j8c-7jfh-h6hx
- Warn: Project is vulnerable to: GHSA-896r-f27r-55mw
- Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h
- Warn: Project is vulnerable to: GHSA-76p3-8jx3-jpfq
- Warn: Project is vulnerable to: GHSA-3rfm-jhwj-7488
- Warn: Project is vulnerable to: GHSA-hhq3-ff78-jv3g
- Warn: Project is vulnerable to: GHSA-4xcv-9jjx-gfj3
- Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv
- Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3
- Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m
- Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h
- Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j
- Warn: Project is vulnerable to: GHSA-566m-qj78-rww5
- Warn: Project is vulnerable to: GHSA-7fh5-64p2-3v2j
- Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp
- Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6
- Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw
- Warn: Project is vulnerable to: GHSA-25hc-qcg6-38wj
- Warn: Project is vulnerable to: GHSA-qm95-pgcg-qqfq
- Warn: Project is vulnerable to: GHSA-cqmj-92xf-r6r9
- Warn: Project is vulnerable to: GHSA-f523-2f5j-gfcg
- Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3
- Warn: Project is vulnerable to: GHSA-7p7h-4mm5-852v
- Warn: Project is vulnerable to: GHSA-fhg7-m89q-25r3
- Warn: Project is vulnerable to: GHSA-34r7-q49f-h37c
- Warn: Project is vulnerable to: GHSA-c9f4-xj24-8jqx
- Warn: Project is vulnerable to: GHSA-5j4c-8p2g-v4jx
- Warn: Project is vulnerable to: GHSA-g3ch-rx76-35fx
- Warn: Project is vulnerable to: GHSA-wr3j-pwj9-hqq6
- Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7
- Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q
- Warn: Project is vulnerable to: GHSA-p9pc-299p-vxgp
Score
3.1
/10
Last Scanned on 2025-02-03
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn MoreOther packages similar to vue-numeric
@opentiny/vue-numeric
vue-numeric-input
Vue Numeric Input Component
vuetify-numeric
Numeric input components for use with vuetifyjs
@syncfusion/ej2-vue-inputs
A package of Essential JS 2 input components such as Textbox, Color-picker, Masked-textbox, Numeric-textbox, Slider, Upload, and Form-validator that is used to get input from the users. for Vue