New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

vue-currency-input

Package Overview
Dependencies
Maintainers
1
Versions
91
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-currency-input

Easy input of currency formatted numbers for Vue.js.

  • 1.22.4
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
66K
decreased by-16.85%
Maintainers
1
Weekly downloads
 
Created
Source

Build Status codecov Codacy Badge npm version Bundlephobia License

Vue Currency Input

The Vue Currency Input plugin allows an easy input of currency formatted numbers. It provides both a standalone component (<currency-input>) and a custom Vue directive (v-currency) for decorating existing input components with currency format capabilities.

Features

  • Tiny bundle size and zero dependencies
  • Format as you type
  • Locale dependent, ISO-compliant currency formatting based on Intl.NumberFormat
  • Distraction free (hides the formatting on focus for easier input)
  • Allows handling values as integer numbers for full precision
  • Auto decimal mode (automatically inserts the decimal symbol, using the last inputted digits as decimal digits)
  • Built-in value range validation
  • Works with input components of popular frameworks like Vuetify or Element

Live Demo

Check out the playground to see it in action.

Quick Start

Install the npm package:

npm install vue-currency-input 
# OR 
yarn add vue-currency-input

Add the Vue plugin in your main.js:

import Vue from 'vue'
import VueCurrencyInput from 'vue-currency-input'

Vue.use(VueCurrencyInput)

Use the <currency-input> component:

<template>
  <currency-input v-model="value" />
</template>

<script>
export default {
  data: () => ({ value: 1000 })
}
</script>

Documentation

Please refer to the project home page for a detailed documentation.

Support me

If you find this plugin helpful or you want to support the development, buy me a coffee:

ko-fi

Keywords

FAQs

Package last updated on 06 Dec 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc