Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

spinner-zilla

Package Overview
Dependencies
Maintainers
0
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

spinner-zilla

A beautiful collection of animated loading spinners for React applications

  • 0.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

🌀 Spinner-Zilla

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

Spinner-Zilla Demo

✨ 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:

PropTypeDefaultDescription
size'sm' | 'md' | 'lg' | 'xl''md'Size of the spinner
colorstring'text-blue-500'Tailwind color class
classNamestring''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:

Keywords

FAQs

Package last updated on 18 Nov 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc