Animated Avatar Group

A stack of overlapping avatars that smoothly expand on hover with staggered spring animations.

Open in v0~8.4 kB

Last updated: March 7, 2026

User 1
User 2
User 3
User 4
+4
User 1
User 2
User 3
User 4
User 5
User 6
+2

Installation

npx smoothui-cli add animated-avatar-group

Features

  • Overlapping avatar stack with smooth expand animation
  • Staggered spring animations on hover
  • Configurable max visible count with "+N" indicator
  • Adjustable size and overlap
  • Hover device detection
  • Respects reduced motion preferences
  • Optional link support per avatar

Accessibility

ARIA Attributes

AttributeElementPurpose
role="group"ContainerGroups the avatars semantically
aria-label="Avatar group"ContainerLabels the avatar group for screen readers
aria-labelAvatar linksUses the avatar's alt text to label each linked avatar

Screen Reader

  • Each avatar image includes an alt attribute from the AvatarData configuration.
  • Linked avatars include rel="noopener" for security.
  • The "+N" overflow indicator conveys the number of hidden avatars.

Reduced Motion

This component respects the prefers-reduced-motion media query via useReducedMotion from Motion. When reduced motion is preferred, all spring animations, scale effects, and stagger delays are disabled. The component also detects hover-capable devices and only applies hover animations on pointer-fine devices.

Props