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

spinner-zilla

v0.1.1

Published

A beautiful collection of animated loading spinners for React applications

Downloads

126

Readme

🌀 Spinner-Zilla

A comprehensive React spinner library featuring 13 beautiful, customizable loading animations. Built with TypeScript and Tailwind CSS for modern web applications.

✨ Features

  • 🎨 12 unique, customizable spinner components
  • 📱 Responsive sizing (sm, md, lg, xl)
  • 🎯 Built with TypeScript for type safety
  • 🌈 Tailwind CSS integration
  • 📦 Zero dependencies (except peer dependencies)
  • 🚀 Lightweight and performant
  • 📖 Comprehensive Storybook documentation
  • ♿ Accessibility-friendly

🚀 Installation

# npm
npm install spinner-zilla

# yarn
yarn add spinner-zilla

# pnpm
pnpm add spinner-zilla

📋 Requirements

This package has the following peer dependencies:

  • react: >=16.8.0
  • react-dom: >=16.8.0
  • tailwindcss: >=3.0.0

📖 Usage

  1. Import the CSS and your desired spinner component:
// Import the CSS (important!)
import 'spinner-zilla/dist/index.css';

// Import your desired components
import { CircleSpinner, RingSpinner, WaveSpinner } from 'spinner-zilla';
  1. Use it in your React component:
function LoadingState() {
  return (
    <div className="flex items-center gap-4">
      <CircleSpinner size="md" color="text-blue-500" />
      <span>Loading...</span>
    </div>
  );
}

⚠️ Important: Make sure to import the CSS file to enable all animations and styles.

🎨 Available Components

  1. CircleSpinner: Simple circular loading animation
  2. ClockSpinner: Clock-like spinner with rotating hands
  3. DNASpinner: DNA helix-inspired loading animation
  4. DotSpinner: Multiple dots with bouncing animation
  5. FlipSpinner: 3D flipping animation effect
  6. GalaxySpinner: Orbital rings with rotating planets
  7. HeartbeatSpinner: Pulsating heart animation
  8. MatrixSpinner: Matrix-inspired digital rain effect
  9. PulseSpinner: Pulsating circle effect
  10. SquareSpinner: Multiple squares with rotation
  11. StarSpinner: Rotating and scaling star animation
  12. WaveSpinner: Multiple bars with wave animation

⚙️ Props

All spinner components accept the following props:

| Prop | Type | Default | Description | |------|------|---------|-------------| | size | 'sm' | 'md' | 'lg' | 'xl' | 'md' | Size of the spinner | | color | string | 'text-blue-500' | Tailwind color class | | className | string | '' | Additional CSS classes |

Size Reference

  • sm: 1rem (16px)
  • md: 1.5rem (24px)
  • lg: 2rem (32px)
  • xl: 2.5rem (40px)

🎯 Examples

Basic Usage

import 'spinner-zilla/dist/index.css';
import { CircleSpinner } from 'spinner-zilla';

<CircleSpinner />  // Uses default props

Custom Size and Color

import 'spinner-zilla/dist/index.css';
import { RingSpinner } from 'spinner-zilla';

<RingSpinner 
  size="lg"
  color="text-purple-500" 
/>

Custom Styling with className

import 'spinner-zilla/dist/index.css';
import { WaveSpinner } from 'spinner-zilla';

<WaveSpinner 
  size="xl"
  color="text-green-500"
  className="p-4 bg-gray-100 rounded-lg shadow-inner" 
/>

Multiple Spinners

import 'spinner-zilla/dist/index.css';
import { DotSpinner, StarSpinner } from 'spinner-zilla';

<div className="flex gap-4">
  <DotSpinner size="sm" color="text-blue-500" />
  <StarSpinner size="md" color="text-yellow-500" />
</div>

🎮 Interactive Demo

Visit our Storybook to see all spinners in action and try different configurations.

🛠️ Development

  1. Clone the repository:
git clone https://github.com/SibilSoren/spinner-zilla.git
  1. Install dependencies:
npm install
  1. Start Storybook for development:
npm run storybook
  1. Build the library:
npm run build

The build process will:

  • Generate the JavaScript bundle in the dist directory
  • Extract and process all CSS including Tailwind utilities
  • Create TypeScript declaration files
  • Bundle all animations and styles into dist/index.css

🧪 Testing

Run the test suite:

npm test

📝 Contributing

Contributions are welcome! Please read our contributing guidelines to get started.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-spinner)
  3. Commit your changes (git commit -m 'Add amazing spinner')
  4. Push to the branch (git push origin feature/amazing-spinner)
  5. Open a Pull Request

📄 License

MIT

🙏 Credits

🤝 Support

Need help? Feel free to: