npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

vue-rolling-number-input

v0.5.3

Published

A Vue number input component that allows using the mouse wheel to adjust individual digits.

Downloads

10

Readme

vue-rolling-number-input

RollingNumberInput is a Vue component that provides a number input field with digits that can be quickly individually adjusted using a mouse wheel or arrow keys on a keyboard. It is ideal for situations such as inputting radio frequencies or distances where users may want to spin through values and need to dynamically change what degree of precision they are modifying.

Attributes

RollingNumberInput

| Attribute | Type | Required? | Default | Usage | |---------------|---------|-----------|-------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------| | allowNegative | Boolean | No | false | true to display the +/- field and allow negative numbers; false to only allow >= 0 | | centerClass | String | No | rolling-number-input-center | CSS class to apply to digits other than the leftmost and rightmost digits | | digitClass | String | No | rolling-number-input-digit | CSS class to apply to all digits | | leftClass | String | No | rolling-number-input-left | CSS class to apply to the leftmost digit | | max | Number | No | undefined | Maximum allowed value; if undefined, will be the largest value that can be displayed in the visible number of digits. | | min | Number | No | undefined | Minimum allowed value; if undefined, will be 0 if allowNegative is false or -max if allowNegative is true. | | name | String | No | empty string | Name of the HTML input for form submission | | precision | Number | No | 0 | Number of digits of decimal precision to display. The precision must be >= 0. | | rightClass | String | No | rolling-number-input-right | CSS class to apply to the rightmost digit | | value | Number | Yes | | Numeric value to display in the field | | width | Number | Yes | | Total number of fields to display; note that this includes the sign and decimal, if negative numbers are allowed or the precision is > 0. The width must be >= 1. |

Demo

https://hatchbed.github.io/vue-rolling-number-input/

Installation

Install the package through NPM:

npm install vue-rolling-number-input

Import it into your project:

import RollingNumberInput from 'vue-rolling-number-input'
import 'vue-rolling-number-input/dist/vue-rolling-number-input.css'

export default {
  components: {
    RollingNumberInput,
  }
}

Usage example:

    <RollingNumberInput
        class="rolling-input"
        :allow-negative="false"
        :max="1000"
        :min="5"
        :width="8"
        :precision="3"
        v-model="fieldValue"
        @change="$emit('change', $event)"
    />