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

react-native-weighted-slider

v0.0.3

Published

An enhanced slider component for react-native that distributes values disproportionately for a better UX

Readme

react-native-weighted-slider

An enhanced slider component for react-native that distributes values disproportionally for a better UX, with support for non-linear step generation. Uses d3 for step generation and quantization.

Instalation

npm install react-native-weighted-slider

Props

Accepts regular react-native slider props + the ones below

| Prop | Default Value | Description | |--------------|--------------------|--------------| | minValue | 0 |Slider minimum value.| | maxValue | 100 |Slider maximum value.| | weight | 1 |This determines how disproportionately the steps are distributed. Values between 1 and 2 are enough for most uses. | useLinearSteps | true |If the slider should distribute the steps linearly or non-linearly. If set to true, the slider will generate steps uniformly for the given min/max e.g. a domain of 0-100 with a step of 25 will generate [0, 25, 50, 75, 100] steps. If set to false, it will generate non-linearly increasing steps based on the current base e.g 0-1000 with a quantize value of 2 will generate [0, 1, 2, 3, 4, 5, 6, 7, 8, 9 10, 15, 20, 25 ... 95, 100, 150, 200, 250 ... 900, 950, 1000] steps. | quantize | 5 | Each non-linear base step will increase by 10/quantize amount e.g. with a quantize level of 5, the non-linear steps generated for [0 - 100] would be [0, 1, ...9, 10, 12, 14, 16 .... 96, 98, 100]. With a quantize level of 2, the non-linear steps generated will be [0, 1, ... 9, 10, 15, 20, 25 ... 90, 95, 100]. Applies only when useLinearSteps is set to false. | step | 1 | Space between linear steps. Applies only when useLinearSteps is set to true.

Direct manipulation

You can set a ref on the slider and use setNativeValue(value), to set a value directly.

TODO:

  • [ ] Add a brief demonstration gif
  • [X] Add runable example