# Avatar Stack

> Overlapping avatar circles that pop up on hover, with a "+N" counter.

- Category: [CSS Effects](https://copy-css.com/category/effects)
- Tags: avatar, stack, overlap, users, team
- Live preview: https://copy-css.com/snippets/avatar-stack
- License: Free for personal and commercial use. No signup, no attribution required.

## HTML

```html
<div class="avatars">
  <span style="background:#f472b6">AK</span>
  <span style="background:#60a5fa">JM</span>
  <span style="background:#34d399">RS</span>
  <span class="more">+5</span>
</div>
```

## CSS

```css
.avatars {
  display: flex;
}

.avatars span {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-left: -12px;
  border: 3px solid #fff;
  border-radius: 50%;
  color: #fff;
  font: 700 14px system-ui, sans-serif;
  transition: transform 0.2s ease;
}

.avatars span:first-child {
  margin-left: 0;
}

.avatars span:hover {
  z-index: 1;
  transform: translateY(-4px);
}

.avatars .more {
  background: #111;
}
```

## Notes

- This CSS Avatar Stack is 30 lines of pure CSS (0.4 KB) with no JavaScript and no dependencies. It uses transitions, transforms, CSS Grid and Flexbox.
- In JSX use `className` instead of `class`. In Tailwind projects put the CSS in the global stylesheet.
