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-wobbly-spinner

v1.1.0

Published

A React component that produces a Wobbly Spinner.

Downloads

20

Readme

react-wobbly-spinner

Build Status

A Wobbly Spinner Component for React. The most highly over-engineered UI spinner component in the course of human history!

A Wobbly Spinner screen shot

You want a spinner on your React powered site, but you aren't a CSS or SVG genius. What is a React developer to do? You simply drop in React <WobblySpinner/> component and your problems are solved.

Everything is controlled by props. No need to edit CSS files. In fact, Wobbly Spinner doesn't use them! We make good use of JSS and intelligently manage the dynamic attaching/detaching of style sheets to/from the DOM as needed. If you have multiple Wobbly Spinners mounted, they will share a style sheet if the props are the same. If they have different props, Wobbly Spinner will attach a unique style sheet.

How do I get it?

npm i react-wobbly-spinner --save

See it Live!

You can see it live and try it out on this Codepen.

Properties

Wobbly Spinner supports these props:

| prop | description | | :----- | :------------ | | diameter | The diameter of the spinner in pixels. (default=62) | | thickness | The thickness of each line in pixels. (default=1) | | wobbleOffset | The offset from center that the "wobble" arc spins in pixels. (default=1) | | spinRate | The rate to complete a full rotation in msecs. (default=1000) | | outerColor | The outer circle color (default = yellow) | | innerColor | The outer partial circle color (default = magenta) | | wobbleColor | The wobble partial circle color (default = cyan) |

Sample Use

Here is an example of rendering the Wobbly Spinner in a simple Hello World React app.

import WobblySpinner from "react-wobbly-spinner";

class App extends React.Component {
  render() {
    return (
      <div>
        <WobblySpinner diameter={30} />
        <span>Loading...</span>
      </div>
    );       
  }
}

var root = document.querySelector(".main");
ReactDOM.render(<App />, root);

A little too colorful for your taste? Try this grayscale version.

<WobblySpinner outerColor="#666" innerColor="#999" wobbleColor="#ccc"/>

Want a simple 3/4 circle spinner (i.e. no "wobble")?

<WobblySpinner thickness={5} outerColor="transparent" innerColor="white" wobbleColor="transparent"/>