Number Input Component With Controls For Vue.js

Number input component based on Vue which is a replacement for the original input number with optional control.

numeric input material ui, numeric input react native, numeric input html, react native numeric input example, carbon number input, number input ui, numeric input npm

Table of Contents

How to make use of it:

Install and download:

# NPM
$ npm install vue-numeric-input --save

1. Import and register the digital input component.

import Vue from 'Vue';
import VueNumericInput from 'vue-numeric-input';
// global
Vue.use(VueNumericInput);
// local
export default {
  components: {
    VueNumericInput
  }
}

2. Add the digital input to the template.

<vue-numeric-input  v-model="value" :min="1" :max="100" :step="1"></vue-numeric-input>

3. Possible props.

name: String,
value: [String, Number],
placeholder: String,
min: {
  type: Number,
  default: Number.MIN_SAFE_INTEGER
},
max: {
  type: Number,
  default: Number.MAX_SAFE_INTEGER
},
step: {
  type: Number,
  default: 1
},
align: {
  type: String,
  default: "left"
},
width: {
  type: String
},
size: {
  type: String,
  default: "normal",
  validator: value => {
    return ["small", "normal", "large"].includes(value);
  }
},
precision: {
  type: Number,
  validator(val) {
    return val >= 0 && Number.isInteger(val);
  }
},
autofocus: {
  type: Boolean,
  default: false
},
readonly: {
  type: Boolean,
  default: false
},
disabled: {
  type: Boolean,
  default: false
},
controls: {
  type: Boolean,
  default: true
},
controlsType: {
  type: String,
  default: "plusminus"
},
mousewheel: {
  type: Boolean,
  default: false
},
isInput: {
  type: Boolean,
  default: true
},
className: {
  type: String,
  default: null
}

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 ComponentStringcss 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

numeric input material-ui

Numeric Input Component For Vue.js, Vue Numeric Input Plugin/Github


See Demo And Download

Official Website(JayeshLab): Click Here

This superior jQuery/javascript plugin is developed by JayeshLab. For extra Advanced Usages, please go to the official website.

Related Posts

Iconpicker-Bootstrap-5

[Icon Picker] Iconpicker for Bootstrap 5 Icons Library

Bootstrap 5-based icon picker which supports any icon libraries like Bootstrap Icons, Font Awesome[fontawesome.com], etc. Must Read: 1000+ Pixel Perfect SVG Icons For Vue Components | Unicons How…

bootstrap-multiple-image-upload-with-preview

Bootstrap Multiple Image Upload with Preview and Delete | ImagesLoader

ImagesLoader is a standard bootstrap image upload plugin that provides an easy-to-use and nice-looking interface for uploading multiple images to a web server. Must Read: HTML 5…

Animating-Split-Flap-Displays-fallblatt

A Lightweight jQuery Plugin for Animating Split-Flap Displays | fallblatt

fallblatt is a lightweight jQuery plugin for animating split screens. This jQuery plugin allows you to include such offers in your web application. Everything from virtual departure…

bootstrap-5-dark-theme

Dark & Light Switch Mode Toggle for Bootstrap 5

Switching to dark mode is done by toggling HTML tags that include -dark or -light as a category. It is made by manipulating the DOM with JavaScript. The text color also changes depending…

jQuery-SyoTimer-Plugin

jQuery Plugin for Countdown Timer on HTML Page | SyoTimer

yoTimer jQuery plugin allows you to create digital style countdowns/periodic timers on the webpage, with callbacks support and timezone/translation customization. Features Periodic count with the specified period…

vue-js-periodic-table

Dynamic, Data-driven Periodic Table built with Vue.js

Periodicity is a dynamic, data-driven periodic table created with Vue.js that uses D3 animations and graphs to show the beauty of periodic trends. Built With vue.js (component…