# macOS-style spinner

> Twelve rounded bars fading in turn around a circle, like the spinner you know from a Mac.

- Category: [Loaders](https://library.aimran.es/components/loaders)
- Built with: React + Motion
- Live editor: https://library.aimran.es/blocks/macos-spinner
- Library: AIMRAN Library (https://library.aimran.es), free, no sign-up, by Aimran Oukham

## Where to use it

This macOS style spinner feels at home in interfaces that look like desktop software: a web-based photo editor, an Electron app or the sync indicator in the toolbar of a notes tool. It takes the text color of the page, so it switches between light and dark mode on its own and never looks out of place.

It reads best at small and medium sizes, next to a label like “Syncing…” or inside a toolbar. Very large, the individual bars start to look heavy, and a lighter ring may suit you better.

## Code

### React (Motion)

```tsx
import { motion } from "framer-motion";

interface MacOSSpinnerProps {
  size?: number;
  /** Segundos por vuelta. */
  speed?: number;
}

export default function MacOSSpinner({
  size = 56,
  speed = 1,
}: MacOSSpinnerProps) {
  return (
    <div
      role="status"
      aria-label="Loading"
      className="relative"
      style={{ width: size, height: size }}
    >
      {Array.from({ length: 12 }, (_, i) => (
        <motion.span
          key={i}
          className="absolute left-1/2 top-0 block rounded-full bg-[#1d1d1f] dark:bg-[#f5f5f7]"
          style={{
            width: size / 11,
            height: size / 3.4,
            marginLeft: -size / 22,
            transformOrigin: `${size / 22}px ${size / 2}px`,
            rotate: i * 30,
          }}
          animate={{ opacity: [0.16, 1, 0.16] }}
          transition={{ duration: speed, repeat: Infinity, delay: (i * speed) / 12 }}
        />
      ))}
    </div>
  );
}
```

## Prompt for AI assistants

Paste this into ChatGPT, Claude, Cursor, v0 or Lovable to adapt the block to your stack (Tailwind, Vue, Svelte…):

````text
I want to add the “macOS-style spinner” block (Loaders) from AIMRAN Library to my project.

## What it is
Twelve rounded bars fading in turn around a circle, like the spinner you know from a Mac.

## Chosen settings
- Size: 56px (from 32 to 96px)
- Speed: 1s (from 0.5 to 2s)

## What I need
1. Add it to my project with the same look and animation as the reference code: same sizes, colours, radii, shadows, timings and easing.
2. It is built with React + TypeScript, with framer-motion for the animation and lucide-react for the icons. If my project uses something else (Vue, Svelte, Astro, plain HTML…), translate it without losing any behaviour. If I use Tailwind, turn the styles into classes; if not, keep the CSS in its own file.
3. Expose the settings above as props (or CSS variables) with those values as defaults.
4. Make it work well on phones: nothing that depends only on hover, touch targets of at least 44 px and no overflow on 320 px screens.
5. Make it look right in light and dark mode.
6. Keep it accessible: semantic HTML, roles and aria-* where needed, visible focus and keyboard support.
7. Respect prefers-reduced-motion: with reduced motion, no big animations but the same end result.

## Reference code
```tsx
import { motion } from "framer-motion";

interface MacOSSpinnerProps {
  size?: number;
  /** Segundos por vuelta. */
  speed?: number;
}

export default function MacOSSpinner({
  size = 56,
  speed = 1,
}: MacOSSpinnerProps) {
  return (
    <div
      role="status"
      aria-label="Loading"
      className="relative"
      style={{ width: size, height: size }}
    >
      {Array.from({ length: 12 }, (_, i) => (
        <motion.span
          key={i}
          className="absolute left-1/2 top-0 block rounded-full bg-[#1d1d1f] dark:bg-[#f5f5f7]"
          style={{
            width: size / 11,
            height: size / 3.4,
            marginLeft: -size / 22,
            transformOrigin: `${size / 22}px ${size / 2}px`,
            rotate: i * 30,
          }}
          animate={{ opacity: [0.16, 1, 0.16] }}
          transition={{ duration: speed, repeat: Infinity, delay: (i * speed) / 12 }}
        />
      ))}
    </div>
  );
}
```

Give me the complete final code, ready to paste, and tell me in one line where to put it in my project.
````
