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

custom-range-slider-controller

v1.0.4

Published

This is a default range slider alternative for volume/video/audio progress control created with **Vue Js**. Stop using input type="range" for volume or audio/video progress control in a audio/video platform. To help you, I made a **Custom Range Slider Co

Downloads

3

Readme

Vue Custom Range Slider Component for Volume or Audio/Video progress control.

This is a default range slider alternative for volume/video/audio progress control created with Vue Js. Stop using input type="range" for volume or audio/video progress control in a audio/video platform. To help you, I made a Custom Range Slider Component in Vue 3 with it's powerful composition API. You can customize the look, widths, heights, colors and even show/hide any parts based on your needs, in short you can customize anything without even editing the component itself.

See examples here: Vue Custom Range Slider Examples

How to use it?

It's so easy😁 Just download or copy the component from the src folder and put it in your project. Then simply import the component and use it as like any other vue js components.

Getting value and setting it

You can use v-model directive on the component to get the slider position value and use it to set the volume or video/audio progress as per your need. You'll get more clear idea if you visit the example above.

Available Props:

rangeContainerHeight - Set the height of the range slider container. default: 7px. NOTE: Set the height bigger than the range slider height. since it's the background of the slider and will be used for hover effect/animation rangeHeight - Set the height of the range slider itself. default: 3px. thumbHeight - Set the height of the thumb indicator. default: 200%. NOTE: Remember to use percentage value to keep the ratios rangeBgColor - Range Slider background color. default: `rgba(100, 100, 100, .5)` thumbColor - Thumb Indicator color. default: `red` previewColor - Preview Bar Color. default: rgb(150, 150, 150). progressColor - Progress Bar Color(Main Indicator). default: red. expandOnHover - hover effect animation as like in youtube video player. default: false. AlwaysShowThumb - show the thumb indicator always. default: false. noPreviewBar - hide the preview indicator. default: false. noProgressBar - hide the Progress/Main Indicator bar. default: false. noThumb - hide the thumb indicator always. default: false.

Providing a default position:

This is simple. add a v-model directive and pass the default value in the reactive variable itself. Example:

Defining the varibale: const value = ref(0.4) Usage in the component: <custom-range-slider v-model="value"></custom-range-slider> This an extremly needed feature. Sometimes we want to set a default progress position from the server or browser localstorage. Imagine you want to add a continue watching feature to your Audio/Video file or maybe you want to give the users the ability to set the volume once and even after reloading the page the volume should not change.

Hope it helps. Let me know if it really helped you😊💖