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 🙏

© 2026 – Pkg Stats / Ryan Hefner

vue-custom-range-slider

v0.2.3

Published

Slider component for vue, with support for custom values

Readme

vue-custom-range-slider

This is a simple vue-range slider, that supports custom values, labels and more. The component is based on use with v-model, the value is always a string, for supporting custom values.

Demo

See the slider in action, in this codesandbox

Installation

NPM

npm install --save vue-custom-range-slider

Yarn

yarn add vue-custom-range-slider

Usage examples

Usage like a native range slider

<template>
  <div>
    <custom-slider min="10" max="50" step="2" raising v-model="slider" />
    {{ slider }}
  </div>
</template>

<script>
  import CustomSlider from "vue-custom-range-slider";
  // import the styling, css or scss
  import "vue-custom-range-slider/dist/vue-custom-range-slider.css";

  export default {
    components: {
      CustomSlider
    },
    data() {
      return {
        slider: "12"
      };
    }
  };
</script>

Usage with custom values

<template>
  <div>
    <custom-slider :values="sliderValues" raising v-model="slider" />
    {{ slider }}
  </div>
</template>

<script>
  import CustomSlider from "vue-custom-range-slider";
  // import the styling, css or scss
  import "vue-custom-range-slider/dist/vue-custom-range-slider.css";

  export default {
    components: {
      CustomSlider
    },
    data() {
      return {
        slider: "a",
        sliderValues: [
          {
            label: "Not at all",
            value: "a"
          },
          {
            label: "A tiny bit",
            value: "b"
          },
          {
            label: "Its ok",
            value: "c"
          },
          {
            label: "Its very good",
            value: "d"
          },
          {
            label: "Its AMAZING!",
            value: "e"
          }
        ]
      };
    }
  };
</script>

Properties:

All properties are optional | Property | Description | Type | Default | |-----------|-------------------------------------------------------------------------------|-----------|---------| | values | Pass an array of custom values, with corresponding labels (overrides min/max) | array | [] | | min | Sets the minimum value of the slider | string | '0' | | max | Sets the maximum value of the slider | string | '100' | | step | Sets the stepping interval | string | '1' | | hideLabel | Set, if you want to hide the label above the slider | boolean | false | | raising | Set if you want a "raising" shape, like: ◁ | boolean | false |

Events

| Name | Description | Type | | ------ | --------------------------------- | -------- | | change | Emits the current value on change | string |

Styling

You can easily modify the look of the slider, by overriding the variables in the scss file.

// override variables like this:
$label-color: red;

// import the styling,
@import "vue-custom-range-slider/dist/vue-custom-range-slider.scss";

All variables can be found in the scss file

Roadmap

  • Disabled properties
  • Name attributes for form handling
  • Better styling options

Contribution

If you have suggestions for improvements, dont hesitate to make an issue or pull request. :)

License

MIT