# Skeleton card

> A card-shaped placeholder with an avatar and text lines that gently pulses while your data arrives.

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

## Where to use it

A skeleton loader shows the shape of what is coming instead of an empty space. This one mimics a profile row with an avatar and a few lines of text, so it suits a comment section, the member list of a team app or the contacts view of a CRM. The page feels faster even when it isn’t.

Match the skeleton to the real layout as closely as you can, so nothing jumps when the content lands. Use a very light tint of your text color; a strong color makes the placeholder look like a finished design.

## Code

### React (Motion)

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

interface SkeletonCardProps {
  color?: string;
  /** Tamaño del avatar en px. */
  size?: number;
  /** Duración de un pulso en segundos. */
  speed?: number;
}

export default function SkeletonCard({
  color = "#86868b",
  size = 40,
  speed = 1.8,
}: SkeletonCardProps) {
  return (
    <motion.div
      aria-busy="true"
      className="w-56 rounded-3xl bg-white p-4 shadow-[0_1px_2px_rgba(0,0,0,0.03),0_8px_28px_rgba(0,0,0,0.05)] dark:bg-[#1c1c1e]"
      animate={{ opacity: [1, 0.4, 1] }}
      transition={{ duration: speed, repeat: Infinity, ease: "easeInOut" }}
    >
      <div className="flex items-center gap-3">
        <div
          className="rounded-full"
          style={{ width: size, height: size, backgroundColor: color }}
        />
        <div className="flex-1 space-y-2">
          <div className="h-2.5 rounded-full" style={{ backgroundColor: color, width: "70%" }} />
          <div className="h-2.5 rounded-full" style={{ backgroundColor: color, width: "40%" }} />
        </div>
      </div>
      <div className="mt-4 space-y-2">
        <div className="h-2.5 rounded-full" style={{ backgroundColor: color }} />
        <div className="h-2.5 rounded-full" style={{ backgroundColor: color, width: "85%" }} />
        <div className="h-2.5 rounded-full" style={{ backgroundColor: color, width: "60%" }} />
      </div>
    </motion.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 “Skeleton card” block (Loaders) from AIMRAN Library to my project.

## What it is
A card-shaped placeholder with an avatar and text lines that gently pulses while your data arrives.

## Chosen settings
- Color: #86868b
- Avatar size: 40px (from 24 to 64px)
- Speed: 1.8s (from 0.8 to 4s)

## 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 SkeletonCardProps {
  color?: string;
  /** Tamaño del avatar en px. */
  size?: number;
  /** Duración de un pulso en segundos. */
  speed?: number;
}

export default function SkeletonCard({
  color = "#86868b",
  size = 40,
  speed = 1.8,
}: SkeletonCardProps) {
  return (
    <motion.div
      aria-busy="true"
      className="w-56 rounded-3xl bg-white p-4 shadow-[0_1px_2px_rgba(0,0,0,0.03),0_8px_28px_rgba(0,0,0,0.05)] dark:bg-[#1c1c1e]"
      animate={{ opacity: [1, 0.4, 1] }}
      transition={{ duration: speed, repeat: Infinity, ease: "easeInOut" }}
    >
      <div className="flex items-center gap-3">
        <div
          className="rounded-full"
          style={{ width: size, height: size, backgroundColor: color }}
        />
        <div className="flex-1 space-y-2">
          <div className="h-2.5 rounded-full" style={{ backgroundColor: color, width: "70%" }} />
          <div className="h-2.5 rounded-full" style={{ backgroundColor: color, width: "40%" }} />
        </div>
      </div>
      <div className="mt-4 space-y-2">
        <div className="h-2.5 rounded-full" style={{ backgroundColor: color }} />
        <div className="h-2.5 rounded-full" style={{ backgroundColor: color, width: "85%" }} />
        <div className="h-2.5 rounded-full" style={{ backgroundColor: color, width: "60%" }} />
      </div>
    </motion.div>
  );
}
```

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