Avatar Circles
magicui/avatar-circlesFreeComponent
Overlapping circles of avatars.
Live preview
live · rendered by the registry
Rendered by magicui on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://magicui.design/r/avatar-circles.jsonSource
1"use client"23import { cn } from "@/lib/utils"45interface Avatar {6 imageUrl: string7 profileUrl: string8}9interface AvatarCirclesProps {10 className?: string11 numPeople?: number12 avatarUrls: Avatar[]13}1415export const AvatarCircles = ({16 numPeople,17 className,18 avatarUrls,19}: AvatarCirclesProps) => {20 return (21 <div className={cn("z-10 flex -space-x-4 rtl:space-x-reverse", className)}>22 {avatarUrls.map((url, index) => (23 <a24 key={index}25 href={url.profileUrl}26 target="_blank"27 rel="noopener noreferrer"28 >29 <img30 key={index}31 className="h-10 w-10 rounded-full border-2 border-white dark:border-gray-800"32 src={url.imageUrl}33 width={40}34 height={40}35 alt={`Avatar ${index + 1}`}36 />37 </a>38 ))}39 {(numPeople ?? 0) > 0 && (40 <a41 className="flex h-10 w-10 items-center justify-center rounded-full border-2 border-white bg-black text-center text-xs font-medium text-white hover:bg-gray-600 dark:border-gray-800 dark:bg-white dark:text-black"42 href=""43 >44 +{numPeople}45 </a>46 )}47 </div>48 )49}
Files it writes
More from magicui
All 247 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Androidandroid | magicui | Components | Free | no deps | |
| Animated Beamanimated-beam | magicui | Components | Free | 1 dep | |
| Animated Circular Progress Baranimated-circular-progress-bar | magicui | Components | Free | no deps | |
| Animated Gradient Textanimated-gradient-text | magicui | Components | Free | no deps | |
| Animated Grid Patternanimated-grid-pattern | magicui | Components | Free | 1 dep | |
| Animated Listanimated-list | magicui | Components | Free | 1 dep | |
| Animated Shiny Textanimated-shiny-text | magicui | Components | Free | no deps | |
| Theme Toggleranimated-theme-toggler | magicui | Components | Free | 1 dep |
