Skip to content

feat: add avatar stack component#57

Draft
AbhinRustagi wants to merge 1 commit into
starc007:mainfrom
AbhinRustagi:feat/avatar-stack
Draft

feat: add avatar stack component#57
AbhinRustagi wants to merge 1 commit into
starc007:mainfrom
AbhinRustagi:feat/avatar-stack

Conversation

@AbhinRustagi

Copy link
Copy Markdown
Contributor

Summary

  • add a standalone AvatarStack motion primitive for overlapping team/presence avatars
  • fan avatars out on hover-capable devices with reduced-motion-safe fallbacks
  • register the component with a preview showing compact collaborator presence

Test plan

  • bun run typecheck
  • bun run lint
  • bun run check:registry

Made with Cursor

Add an overlapping avatar group primitive with hover fan-out motion and a compact preview for team presence states.

Co-authored-by: Cursor <cursoragent@cursor.com>
@starc007

Copy link
Copy Markdown
Owner

spreadOnHover doesn't spread the stack — only the single hovered avatar moves. (medium, core interaction)**
avatar-stack.tsx:65whileHover is on each <motion.li>, so it fires only for the avatar the pointer is over. That one jumps to its fanned position x = index * expandedStep while its neighbors stay overlapped → gaps and overlaps, not a clean fan-out. The group class on the <ul> is set but never used (group-hover), and the <ul> isn't a motion element, so nothing coordinates a whole-stack spread.
Fix options: drive it from the parent — make the <ul> a motion.ul with whileHover + variants and have each <li> reference variant labels (rest/spread), or apply the fanned x via CSS group-hover on each li. If the intent was only a per-avatar lift, drop x: hoverX and keep y/scale.

Screendrop_2026-06-23-15-05-56.mov

@starc007

Copy link
Copy Markdown
Owner

also just a suggestion remove Co-authored-by: Cursor <cursoragent@cursor.com> from the commit message

@AbhinRustagi

Copy link
Copy Markdown
Contributor Author

These (avatar, alert, skeleton & spinner) were not supposed to be pushed yet; I didn't realise. My bad! Converting to draft for now

@AbhinRustagi AbhinRustagi marked this pull request as draft June 23, 2026 09:52
@starc007

Copy link
Copy Markdown
Owner

okay okay no worries

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants