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

react-simple-wheel-picker

v1.2.0

Published

<div align="center"> <h1>react-simple-wheel-picker</h1> <img src="https://raw.githubusercontent.com/keiya01/react-simple-wheel-picker/master/demo.gif" alt="demo"> <br> <p>You can set up simple and flexible wheel picker</p> <br> </div> <hr/>

Downloads

2,161

Readme

Overview

  • This package is simple and flexible wheel picker for React
  • This package move like same as native applications picker
  • This package support accessibility

Usage

  • npm i react-simple-wheel-picker or yarn add react-simple-wheel-picker
  • Look at simple example below or please check example if you want to know more detail usage
import WheelPicker from 'react-simple-wheel-picker';

const data = [
	{
		id: '1',
		value: 'test1'
	},
	{
		id: '2',
		value: 'test2'
	},
	{
		id: '3',
		value: 'test3'
	},
	{
		id: '4',
		value: 'test4'
	},
	{
		id: '5',
		value: 'test5'
	}
];

const Sample = () => {
	const handleOnChange = target => {
		console.log(target);
	};
	return (
		<WheelPicker
			data={data}
			onChange={handleOnChange}
			height={150}
			width={100}
			titleText="Enter value same as aria-label"
			itemHeight={30}
			selectedID={data[0].id}
			color="#ccc"
			activeColor="#333"
			backgroundColor="#fff"
		/>
	);
};

Normal Props

| props | type | require | description | | :-------------: | :------------------------------------------: | :-----: | :-------------------------------------------------------------------------------------------- | | data | Array<{id: string, value: string | number}> | true | It should be array of object that have id and value | | selectedID | string | true | You can set default data id | | onChange | function(data: PickerData): void | true | You can get value or id | | height | number | true | You can specify height to wheel picker | | itemHeight | number | true | You can specify item height to wheel picker item | | width | number | false | You can specify width to wheel picker | | idName | string | false | You can specify id name to have relation to htmlFor label element | | color | string | false | You can specify color to picker value | | activeColor | string | false | You can specify active color to picker value | | fontSize | number | false | You can specify font size to picker value | | backgroundColor | string | false | You can specify background color to wheel picker | | shadowColor | string | false | You can specify shadow color to wheel picker | | focusColor | string | false | You can specify focus color that is painted border color when WheelPicker is focused | | ref | WheelPickerRef | false | You can refer element to use focus or blur function by specifying ref props |

Accessibility Props

| props | type | require | description
| :-------------: | :------------------------------------------: | :-----: | :---------- | | titleID | string | false | You can specify titleID that it is linked with aria-labelledby | | titleText | string | false | You can specify titleText that it is linked with aria-label | | required | boolean | false | You can specify required that it is linked with aria-required |

If you want to know more about accessibility, you can check here.

Accessibility for this package

  • Support aria-* and role options
  • Support keyboard operation