Join our Discord Community
Interactive

Animated Tooltip

Dynamic avatar group with spring-animated tooltips on hover. Perfect for React applications requiring team displays with Next.js integration and TypeScript support.

Powered by

Loading component...

Installation

npx shadcn@latest add https://www.shadcn.io/registry/animated-tooltip.json
npx shadcn@latest add https://www.shadcn.io/registry/animated-tooltip.json
pnpm dlx shadcn@latest add https://www.shadcn.io/registry/animated-tooltip.json
bunx shadcn@latest add https://www.shadcn.io/registry/animated-tooltip.json

Features

  • Spring animations with customizable stiffness and damping using Motion
  • Dynamic positioning with mouse-follow effects on hover interaction
  • Gradient accents with emerald and sky color highlights for visual appeal
  • Stacked avatars with negative margins creating overlapping group effect
  • Smooth transitions for scale, opacity, and rotation transformations
  • TypeScript support with comprehensive type definitions for all props
  • Performance optimized using requestAnimationFrame for mouse tracking

Use Cases

This free open source React component works well for:

  • Team displays - Show team members with interactive details built with Next.js
  • User avatars - Compact avatar groups using TypeScript and Motion animations
  • Contributor lists - Display project contributors with hover information
  • Social profiles - Interactive user lists for modern web applications

API Reference

AnimatedTooltip

PropTypeDefaultDescription
itemsAnimatedTooltipItem[]requiredArray of items to display with tooltips

AnimatedTooltipItem

PropTypeDefaultDescription
idnumberrequiredUnique identifier for the item
namestringrequiredName displayed in the tooltip
designationstringrequiredRole or title shown below the name
imagestringrequiredAvatar image URL

Implementation Notes

  • Avatars stack with -4rem negative margin for overlapping effect
  • Tooltip appears 4rem above avatar with dynamic rotation based on mouse position
  • Uses Motion's spring physics for smooth, natural animations
  • Gradient lines add visual polish to tooltip appearance
  • Mouse movement tracking optimized with requestAnimationFrame
  • Compatible with all shadcn/ui components and design system