# Avatar Stack Animate 1 - Animate on hover

> AvatarStack with the animate prop spreading avatars apart on hover.

A shadcn/ui block from the [@shadcnblocks](https://shadcnblocks.com) registry, listed on [shadcn.exchange](https://shadcn.exchange/r/shadcnblocks/avatar-stack-avatar-stack-animate-1).

- Page, with a live preview: https://shadcn.exchange/r/shadcnblocks/avatar-stack-avatar-stack-animate-1
- Screenshot: https://abzjhwgwpdpz7ua5.public.blob.vercel-storage.com/shots/shadcnblocks/avatar-stack-avatar-stack-animate-1-light-c690c9f23bed8aa5.png
- Registry item: https://shadcnblocks.com/r/avatar-stack-avatar-stack-animate-1.json
- Listed: 2026-10-13, source last changed 2026-10-13

## Install

```bash
npx shadcn@latest add https://shadcnblocks.com/r/avatar-stack-avatar-stack-animate-1.json
```

Run it in a project that has shadcn/ui set up. It adds the files below and installs what they depend on.

## Dependencies

- Registry items: `avatar`, `https://www.kibo-ui.com/r/avatar-stack.json`

## Files

### `example/avatar-stack/avatar-stack-animate-1.tsx`

```tsx
import { AvatarStack } from "@/components/kibo-ui/avatar-stack";
import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar";

const person1 = {
  name: "Jack Walsh",
  firstName: "Jack",
  lastName: "Walsh",
  initials: "JW",
  email: "jack.walsh@example.com",
  username: "jackwalsh",
  role: "Product Designer",
  company: "Cartwright",
  location: "Brisbane, Australia",
  avatar: "https://cdn.shadcnblocks.com/shadcnblocks/image-set/modern/avatars/avatar1.webp",
};
const person2 = {
  name: "Ilze Pērkone",
  firstName: "Ilze",
  lastName: "Pērkone",
  initials: "MK",
  email: "iperkone@example.com",
  username: "iperkone",
  role: "Brand Director",
  company: "Kivit",
  location: "Rīga, Latvia",
  avatar: "https://cdn.shadcnblocks.com/shadcnblocks/image-set/modern/avatars/avatar2.webp",
};
const person3 = {
  name: "Vernon Desilets",
  firstName: "Vernon",
  lastName: "Desilets",
  initials: "VD",
  email: "vernod@example.com",
  username: "vernod",
  role: "Creative Director",
  company: "Soho Logix",
  location: "Paris, France",
  avatar: "https://cdn.shadcnblocks.com/shadcnblocks/image-set/modern/avatars/avatar3.webp",
};
const person4 = {
  name: "Lín Wàngshū",
  firstName: "Lín",
  lastName: "Wangshu",
  initials: "LW",
  email: "linwang4@example.com",
  username: "liwang",
  role: "Graphic Designer",
  company: "Tenxcloud",
  location: "Shanghai, China",
  avatar: "https://cdn.shadcnblocks.com/shadcnblocks/image-set/modern/avatars/avatar4.webp",
};

export const title = "Animate on hover";

const Example = () => (
  <div className="w-full max-w-md">
    <AvatarStack animate>
      {[person1, person2, person3, person4].map((person) => (
        <Avatar key={person.username}>
          <AvatarImage alt={person.name} src={person.avatar} />
          <AvatarFallback>{person.initials}</AvatarFallback>
        </Avatar>
      ))}
    </AvatarStack>
  </div>
);

export default Example;
```
