Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vue-numeric-input

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-numeric-input

Vue Numeric Input Component

  • 2.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
940
decreased by-10.82%
Maintainers
1
Weekly downloads
 
Created
Source

Vue Numeric Input

npm npm Build Status codecov npm

Number input component based on Vue that is a replacement of native input number with optional control.

vue-numeric-input

Live Demo & Doc

Installation

Install via NPM

$ npm install vue-numeric-input --save

Install via CDN

<script src="https://unpkg.com/vue"></script>
<script src="https://unpkg.com/vue-numeric-input"></script>
Global

Register VueNumericInput globally:

import Vue from 'Vue';
import VueNumericInput from 'vue-numeric-input';

Vue.use(VueNumericInput)
Local

Include the VueNumericInput directly into your component using import:

import VueNumericInput from 'vue-numeric-input'

export default {
  components: {
    VueNumericInput
  }
}

Usage

Basic usage
<template>
  <div>
    <vue-numeric-input  v-model="value" :min="1" :max="10" :step="2"></vue-numeric-input>
  </div>
</template>

<script>
  export default {
    data() {
      return {
        value: 1,
      };
    },
  };
</script>
PROPS:
NameDescriptionTypeDefaultOptions
nameComponent nameString--
valueBinding valueNumber--
placeholderInput placeholderString--
minMinimum allowed valueNumber-Infinity-
maxMaximum allowed valueNumberInfinity-
stepIncremental StepNumber1-
alignAlignment of Numeric ValueStringleftleft, center, right
widthComponent WidthString150pxwidth in px, em, rem etc e.g. ‘20px’
sizeComponent SizeStringnormalsize value can be 'small', 'normal', 'large'
precisionNumber of decimalsNumber0Integer value
controlsEnable/Disable ControlsBooleantruetrue/false
controlsTypeControls TypeStringplusminusplusminus/updown
autofocusAutofocus on Page LoadBooleanfalsetrue/false
readonlyIs ReadonlyBooleanfalsetrue/false
disabledIs DisabledBooleanfalsetrue/false
isinputenable/disable keyboard input of numberBooleanfalsetrue/false
mousewheelEnable increment/decrement with mousewheel eventBooleanfalsetrue/false
classNameCss Class for Input ComponentString-css class name
EVENTS:
Event NameDescriptionParameters
inputtriggers when input(newValue)
changetriggers when the value changes(newValue)
blurtriggers when Input blurs(event: Event)
focustriggers when Input focus(event: Event)
METHODS:
MethodDescriptionParameters
focusfocus the Input component-
blurblur the Input component-

Inspired by react-numeric-input

License

MIT

Keywords

FAQs

Package last updated on 29 Sep 2021

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