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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@annoyingmouse/wc-slider

v1.0.13

Published

This web component creates a highly configurable slider element.

Readme

This web component creates a highly configurable slider element.

Published on webcomponents.org

Usage

<wc-slider></wc-slider>
<script type="module" src="wc-slider.js"></script>

Configuration

The slider's appearance and behaviour can be changed using attributes.

Adding a width number variable will change the dimension of the chart from the default of 100%.

Adding a min number variable will change the start number of the slider from the default of 1.

Adding a max number variable will change the end number of the slider from the default of 7.

Adding a from hex colour will change the start colour of the slider from the default of #afd6f3.

Adding a to hex colour will change the end colour of the slider from the default of #2b91de.

(there will be a stepped gradient of shades between from and to between min and max)

Adding a deselected-from hex colour will change the deselected start colour of the slider from the default of #d0d5d5 (In reality, this will never be shown).

Adding a deselected-to hex colour will change the deselected end colour of the slider from the default of #7f8c8d.

(there will be a stepped gradient of deselected shades between deselected-from and deselected-to between min and max)

Adding a constrain-min number variable will constrain the minimum value surfaced by the slider. The default value is the min

Adding a constrain-max number variable will constrain the maximum value surfaced by the slider. The default value is the max

All attributes are optional

Usage

Dragging the slider element will alter the value surfaced by the component from its value attribute (should the number in which the drop ends be greater than or equal to the constrain-min or less than or equal to the constrain-max)

Clicking on the numbers shown at the top of each step will alter the value surfaced by the component from its value attribute (should the number be greater than or equal to the constrain-min or less than or equal to the constrain-max).

Clicking on the triangles either side of the slider will alter the value surfaced by the component from its value attribute by +/- 1 (should the number resulting from the click be greater than or equal to the constrain-min or less than or equal to the constrain-max).

Caution

The range of numbers, inclusive of min and max, should not be too large - tests have found that the ranges should not have more than 15 numbers, but YMMV.