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

spinning-picker-wheel

v1.0.0

Published

A React component for a spinning picker wheel

Readme

Spinning Picker Wheel

A customizable, animated spinning question wheel component for React applications.

Live example of usage: Icebreaker Questions

Features

  • 🎡 Smooth spinning animation
  • 🎨 Customizable colors
  • 🔊 Optional sound effect
  • 📱 Responsive design
  • ♿ Accessible

Installation

npm install spinning-picker-wheel
# or
yarn add spinning-picker-wheel

Prerequisites

This component uses Tailwind CSS for styling. Ensure Tailwind CSS is configured in your project.

If you haven't set up Tailwind CSS yet, follow the official guide.

Usage

import React from 'react';
import { QuestionWheel } from 'spinning-picker-wheel';

const App = () => {
  const questions = [
    "What is your favorite movie?",
    "Where would you like to travel?",
    "What is your hidden talent?",
    // ... add more questions
  ];

  return (
    <div className="p-8 flex justify-center">
      <QuestionWheel 
        questions={questions} 
        soundUrl="/spin-sound.mp3" // Optional: Path to your sound file
      />
    </div>
  );
};

export default App;

Props

| Prop | Type | Default | Description | |------|------|---------|-------------| | questions | string[] | Required | Array of questions to display on the wheel. | | soundUrl | string | undefined | URL to an audio file (mp3) to play during spin. | | colors | string[] | DEFAULT_COLORS | Array of hex color codes for the wheel segments. |

Adding Spinning Sound

To add a spinning sound effect to your wheel, follow these steps:

1. Prepare Your Audio File

  • Use an MP3 format audio file
  • Keep the file size small (under 100KB recommended) for better performance
  • The sound should be short (1-3 seconds) as it will play during the spin

2. Add the Audio File to Your Project

For Next.js Projects:

Place your audio file in the public folder:

your-project/
├── public/
│   └── spin-sound.mp3
├── app/
└── ...

For Create React App:

Place your audio file in the public folder:

your-project/
├── public/
│   └── spin-sound.mp3
├── src/
└── ...

3. Reference the Sound in Your Component

<QuestionWheel 
  questions={questions} 
  soundUrl="/spin-sound.mp3"
/>

4. Finding or Creating Sound Effects

You can find free spinning wheel sound effects from:

  • Freesound.org - Search for "wheel spin" or "roulette"
  • Mixkit - Free sound effects library
  • Zapsplat - Free sound effects (requires attribution)

Note: The component includes a sound toggle button, allowing users to mute/unmute the sound effect.

Styling

The component uses Tailwind CSS classes. You can wrap the component in a container to control its size and positioning.

License

MIT