Socket
Socket
Sign inDemoInstall

vue-currency-input

Package Overview
Dependencies
10
Maintainers
1
Versions
89
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    vue-currency-input

Easy input of currency formatted numbers for Vue.js.


Version published
Weekly downloads
64K
increased by0.77%
Maintainers
1
Created
Weekly downloads
 

Readme

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

Last updated on 16 Aug 2020

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc