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

react-native-lite-range-slider

v0.1.0

Published

Dependency-free two-thumb range slider for React Native and Expo, built on PanResponder.

Readme

react-native-lite-range-slider

A two-thumb range slider for React Native and Expo with zero dependencies: no Reanimated, no Gesture Handler, no native code. It only uses PanResponder and View, so it works in Expo Go, on the web and with the New Architecture.

Installation

npm install react-native-lite-range-slider

Usage

import { useState } from "react";
import { RangeSlider } from "react-native-lite-range-slider";

export function PriceFilter() {
  const [range, setRange] = useState({ low: 0, high: 500 });

  return (
    <RangeSlider
      min={0}
      max={500}
      step={10}
      low={range.low}
      high={range.high}
      onValueChanged={(low, high) => setRange({ low, high })}
      onSliderTouchEnd={(low, high) => fetchProducts(low, high)}
    />
  );
}

The slider is controlled. Store the values from onValueChanged and pass them back through low and high.

Props

| Prop | Type | Default | Description | | --- | --- | --- | --- | | min | number | required | Lowest selectable value. | | max | number | required | Highest selectable value. | | step | number | 1 | Distance between two selectable values. Decimal steps (0.1) are rounded without float noise. | | low | number | min | Value of the low thumb. | | high | number | max | Value of the high thumb. | | minRange | number | 0 | Minimum distance kept between the two thumbs. | | disabled | boolean | false | Ignores touches and accessibility actions. | | inverted | boolean | I18nManager.isRTL | Puts min on the right. | | onValueChanged | (low, high) => void | required | Called on every change while dragging. | | onSliderTouchStart | (low, high) => void | | Called when a drag starts. | | onSliderTouchEnd | (low, high) => void | | Called when the thumb is released. This is the place to fetch data. | | thumbSize | number | 20 | Size of the thumbs and of their touch target. | | railHeight | number | 5 | Height of the rail. | | railColor | string | #c4c4c4 | Rail color outside the selection. | | selectedRailColor | string | #2196f3 | Rail color between the thumbs. | | thumbColor | string | #2196f3 | Color of the default thumbs. | | style | ViewStyle | | Container style. | | railStyle | ViewStyle | | Extra style for the rail. | | selectedRailStyle | ViewStyle | | Extra style for the selected part of the rail. | | thumbStyle | ViewStyle | | Extra style for the default thumbs. | | renderThumb | (thumb: "low" \| "high", value: number) => ReactNode | | Custom thumb, centered in a thumbSize square. | | lowThumbAccessibilityLabel | string | "Minimum" | Screen reader label of the low thumb. | | highThumbAccessibilityLabel | string | "Maximum" | Screen reader label of the high thumb. | | testID | string | | Also sets ${testID}-low and ${testID}-high on the thumbs. |

Custom thumb

<RangeSlider
  min={0}
  max={100}
  thumbSize={28}
  onValueChanged={setValues}
  renderThumb={(thumb, value) => (
    <View style={styles.thumb}>
      <Text style={styles.label}>{value}</Text>
    </View>
  )}
/>

Behavior

  • The whole slider is a single touch area. A touch grabs the closest thumb, and a drag inside a ScrollView keeps the gesture.
  • Each thumb is an adjustable element for screen readers. Swiping up or down moves it by one step and calls onValueChanged, then onSliderTouchEnd.
  • Values outside [min, max] are clamped. high is never displayed below low.

Performance

Each move during a drag calls onValueChanged and re-renders the slider on the JS thread. This is fine for filters and forms. For 60 fps animations driven by the slider, use a Reanimated-based slider instead.

License

MIT