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

roundy

v3.0.3

Published

<img src='https://github.com/themre/roundy/blob/master/roundy.png?raw=true' alt='Roundy'/>

Downloads

2,311

Readme

roundy

Configurable react round slider. Supports touch events.

Installation

npm i roundy (or yarn add roundy)

Usage

import Roundy from 'roundy';

const {value} = this.state
<Roundy
   value={value}
   min={10}
   max={30}
   stepSize={5}
   radius={100}
   color='pink'
   onChange={value => this.setState({value})}
   onAfterChange={(value, props) => ... }
   overrideStyle={ ... string template as CSS ...}
/>

You can create pie round chart

<Roundy
   arcSize={270}
   min={10}
   max={30}
   rotationOffset={-45}
/>

Or use roundy as a group of sliders:

import { RoundyGroup } from 'roundy'

<RoundyGroup sliders={[
    { value: 30, step: 10, id: 'mjaw', max: 50,  radius: 60, color: 'blueviolet', onChange:(val, props) => console.log(props) },
    { value: 30, step: 10, max: 50, radius: 100 },
    { value: 100, step: 20, max: 200, color: 'orange', radius: 140, sliced: false, step: 1 }
]} />

API

Roundy provides the following API:

| Prop | Description | Default | | ------------- |-------------| -----| | value | number: Slider value | 50 | | min | number: Minimal value | 0 | | max | number: Maximum value | 100 | | stepSize | number: Step value to snap value | 0 | | steps | number: Number of steps that will be snapable | 0 | | radius | number: Slider radius | 100 | | color | string: Active slider color | 'purple' | | bgColor | string: Slider arc color | '#ccc' | | strokeWidth | number: Slider arc width | 15 | | thumbSize | number: Size (diameter) of thumb | 20 | | sliced | boolean: Provide slices based on step value | true | | onChange | function: immediate callback function (value, props) | null | | onAfterChange | function: callback function after release (value, props) | null | | overrideStyle | string: provide additional class style which will be injected into styled-components class | null | | arcSize | number: Size of the arc. Default is 360, can be between 1 and 360 | 360 | | rotationOffset | number: rotation of the whole circle. Can be between -180 and 180 | 0 | | render | render prop function that has a signature: ({value, angle}, props) => Node | null |

Testing

TODO

Contribution

Always happy to take PRs.