# Breathing dots

> Three dots that swell and fade in a slow, coordinated breath, calmer than the usual bounce.

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

## Where to use it

Where bouncing dots feel chatty, these breathing dots feel composed. They suit moments that should stay calm: an AI assistant thinking about an answer, a meditation app preparing a session or a banking app confirming a transfer. The dots grow and brighten one after another, like a slow inhale.

Give them a slower speed than a typical loader, around one and a half to two seconds per cycle, and they become almost soothing. They look lost at tiny sizes, so leave some room around them.

## Code

### React (Motion)

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

interface BreathingDotsProps {
  color?: string;
  size?: number;
  /** Duración de una respiración en segundos. */
  speed?: number;
}

export default function BreathingDots({
  color = "#6e6e73",
  size = 15,
  speed = 1.5,
}: BreathingDotsProps) {
  return (
    <div role="status" aria-label="Loading" className="flex gap-3">
      {[0, 1, 2].map((i) => (
        <motion.span
          key={i}
          className="rounded-full"
          style={{ width: size, height: size, backgroundColor: color }}
          animate={{ scale: [0.72, 1, 0.72], opacity: [0.35, 1, 0.35] }}
          transition={{ duration: speed, delay: i * 0.18, repeat: Infinity }}
        />
      ))}
    </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 “Breathing dots” block (Loaders) from AIMRAN Library to my project.

## What it is
Three dots that swell and fade in a slow, coordinated breath, calmer than the usual bounce.

## Chosen settings
- Color: #6e6e73
- Size: 15px (from 8 to 28px)
- Speed: 1.5s (from 0.8 to 3s)

## 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 BreathingDotsProps {
  color?: string;
  size?: number;
  /** Duración de una respiración en segundos. */
  speed?: number;
}

export default function BreathingDots({
  color = "#6e6e73",
  size = 15,
  speed = 1.5,
}: BreathingDotsProps) {
  return (
    <div role="status" aria-label="Loading" className="flex gap-3">
      {[0, 1, 2].map((i) => (
        <motion.span
          key={i}
          className="rounded-full"
          style={{ width: size, height: size, backgroundColor: color }}
          animate={{ scale: [0.72, 1, 0.72], opacity: [0.35, 1, 0.35] }}
          transition={{ duration: speed, delay: i * 0.18, repeat: Infinity }}
        />
      ))}
    </div>
  );
}
```

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