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

rn-ruler-picker

v0.0.2

Published

A customizable horizontal rular-style picker for React Native applications.

Readme

react-native-ruler-picker

RulerPicker is a customizable horizontal ruler-style picker for React Native applications. It allows users to select values within a defined range using an intuitive scrolling interface. Perfect for weight, height, or any range-based selection.

RulerPicker Demo

Features

  • 📏 Customizable scale: Define min/max values and step sizes.
  • 🎨 Style options: Fully customizable styles for lines, text, and ruler elements.
  • 🚀 Performance optimized: Smooth scrolling and precise value selection.
  • 📦 Lightweight: Easy to integrate into any React Native project.

Installation

npm install react-native-ruler-picker

or

yarn add react-native-ruler-picker

Usage

Here's how to use the RulerPicker in your React Native project:

import React from 'react';
import { View } from 'react-native';
import RulerPicker from 'react-native-ruler-picker';

const App = () => {
  const handleValueChange = (value: number) => {
    console.log('Selected Value:', value);
  };

  return (
    <View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
      <RulerPicker
        initialValue={70}
        minValue={10}
        maxValue={200}
        step={1}
        unit="Kg"
        onValueChange={handleValueChange}
      />
    </View>
  );
};

export default App;

Props

| Prop | Type | Default | Description | |----------------------|-------------|----------|-----------------------------------------------------------------------------| | initialValue | number | 68 | Initial value displayed on the ruler. | | minValue | number | 8 | Minimum value selectable on the ruler. | | maxValue | number | 230 | Maximum value selectable on the ruler. | | step | number | 0.1 | Step between consecutive scale values. | | unit | string | "Kg" | Unit displayed next to the selected value. | | onValueChange | function | null | Callback triggered when the selected value changes. | | rulerStyle | ViewStyle | null | Style for the ruler container. | | scaleItemStyle | ViewStyle | null | Style for individual scale items. | | lineStyle | ViewStyle | null | Style for the line elements on the ruler. | | textStyle | TextStyle | null | Style for the text elements of scale values. | | unitStyle | TextStyle | null | Style for the unit text (e.g., "Kg"). | | centerLineStyle | ViewStyle | null | Style for the center marker line of the ruler. | | scaleWrapperStyle | ViewStyle | null | Style for the wrapper containing scale elements. | | weightTextStyle | TextStyle | null | Style for the selected value text. | | weightContainerStyle | ViewStyle | null | Style for the container displaying the selected value and unit. |

Customization

The RulerPicker is highly customizable. Use the provided style props to modify the appearance to suit your app's design.

For example:

<RulerPicker
  initialValue={50}
  minValue={20}
  maxValue={100}
  unit="Kg"
  weightTextStyle={{ fontSize: 40, color: 'blue' }}
  centerLineStyle={{ backgroundColor: 'red', height: 80 }}
  lineStyle={{ backgroundColor: 'gray' }}
  textStyle={{ color: 'black', fontSize: 12 }}
  onValueChange={(value) => console.log(value)}
/>

Example Output

Selected Value: 68

License

This package is licensed under the MIT License.


Contributing

We welcome contributions! Feel free to submit a pull request or open an issue for any bug fixes or feature suggestions.