JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 3
  • Score
    100M100P100Q40808F

Missing React, typescript NPM library creation template

Package Exports

  • react-fidget-spinner

Readme

React Fidget Spinner

CI Storybook deploy

Turn any react component into a clickable fidget spinner.

a silly goose not just this goose 🪿

Quickstart

npm i react-fidget-spinner
import {FidgetSpinner} from "react-fidget-spinner"


const MyFidgetSpinner = () => {

    return (
        <FidgetSpinner>
            <MyComponent> <-- This now spins when you click it
        </FidgetSpinner>
    )
}

Where are the full docs?

Full docs and, more importantly(!), interactive and clickable examples on Storybook.

Features

  • 🎡 Physics-based flywheel spinner animation and interaction
  • ✨ Spark Particles
  • 🫧 Bubble Particles
  • 💥 Click Animation
  • 🦣 Scaling Animation
  • 🏎️ Velocity Breakpoints - Change your configuration based on the velocity of the spinner.
  • 🎨 Highly customisable animations with full defaults to get you started
  • 🔫 Callback triggers for all key events

Context

Adding fun or little easter eggs into projects is often overlooked and can often not perceived to be worth the time investment from a business (or even personal) perspective.

But Users often love and sometimes remember these little interactions.

Inspired by react-confetti which made fun easy for me, I thought it could be a nice short project to build something light and interactive that other people might be able to use. So, here it is a silly component that turns whatever you want into a spinning interactive widget.

I also took this as a nice opportunity to publish my first public npm package and learn a bit more about storybook (which I really enjoyed, especially given how the entire value of the component comes from interacting with the spinner live)

Shoutouts

Contibuting

  • Feel free to open issues, send me a message or submit a PR and I will try and respond ❤️