# Listing skeleton

> A placeholder shaped like a rental listing, with photo, title, location and price, and a shimmer across the image.

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

## Where to use it

Booking and marketplace sites live on grids of listings, and those photos take a moment to load. This skeleton reproduces the usual card of a holiday rental, a hotel or a flat for sale: a big image followed by lines for title, location and price. Fill a whole grid with them and the page keeps its shape.

Show as many skeletons as results you expect, not just one, so the layout doesn’t reflow later. The shimmer only runs over the photo on purpose; keeping the text lines still makes the grid calmer to look at.

## Code

### React (Motion)

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

interface StaySkeletonProps {
  /** Segundos que tarda el brillo en cruzar la foto. */
  speed?: number;
}

export default function StaySkeleton({
  speed = 1.6,
}: StaySkeletonProps) {
  return (
    <div aria-busy="true" className="w-full max-w-64 space-y-3">
      <div className="relative aspect-[4/3] overflow-hidden rounded-2xl bg-black/5 dark:bg-white/10">
        <motion.div
          className="absolute inset-0 bg-[linear-gradient(90deg,transparent,rgba(29,29,31,0.08),transparent)] bg-[length:200%_100%] dark:bg-[linear-gradient(90deg,transparent,rgba(245,245,247,0.08),transparent)]"
          animate={{ backgroundPosition: ["200% 0", "-200% 0"] }}
          transition={{ duration: speed, repeat: Infinity, ease: "linear" }}
        />
      </div>
      <div className="h-3 w-4/5 rounded-full bg-black/5 dark:bg-white/10" />
      <div className="h-3 w-2/5 rounded-full bg-black/5 dark:bg-white/10" />
      <div className="h-3 w-1/3 rounded-full bg-black/5 dark:bg-white/10" />
    </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 “Listing skeleton” block (Loaders) from AIMRAN Library to my project.

## What it is
A placeholder shaped like a rental listing, with photo, title, location and price, and a shimmer across the image.

## Chosen settings
- Speed: 1.6s (from 0.7 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 StaySkeletonProps {
  /** Segundos que tarda el brillo en cruzar la foto. */
  speed?: number;
}

export default function StaySkeleton({
  speed = 1.6,
}: StaySkeletonProps) {
  return (
    <div aria-busy="true" className="w-full max-w-64 space-y-3">
      <div className="relative aspect-[4/3] overflow-hidden rounded-2xl bg-black/5 dark:bg-white/10">
        <motion.div
          className="absolute inset-0 bg-[linear-gradient(90deg,transparent,rgba(29,29,31,0.08),transparent)] bg-[length:200%_100%] dark:bg-[linear-gradient(90deg,transparent,rgba(245,245,247,0.08),transparent)]"
          animate={{ backgroundPosition: ["200% 0", "-200% 0"] }}
          transition={{ duration: speed, repeat: Infinity, ease: "linear" }}
        />
      </div>
      <div className="h-3 w-4/5 rounded-full bg-black/5 dark:bg-white/10" />
      <div className="h-3 w-2/5 rounded-full bg-black/5 dark:bg-white/10" />
      <div className="h-3 w-1/3 rounded-full bg-black/5 dark:bg-white/10" />
    </div>
  );
}
```

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