๐จ
UI Library
A collection of beautiful, reusable React components and CSS snippets built with Tailwind CSS and Framer Motion.
Avatars
Graphical representations of users or entities.
Basic Avatar

JD

AB
CD
+9
Avatar.tsxLanguage: tsx
import Image from 'next/image';
export function AvatarExamples() {
return (
<div className="flex gap-6 items-center">
{/* Image Avatar */}
<div className="relative w-12 h-12 rounded-full overflow-hidden border-2 border-border shadow-sm">
<Image src="/me.jpg" alt="User" fill className="object-cover" />
</div>
{/* Initial Avatar */}
<div className="w-12 h-12 rounded-full bg-accent/20 text-accent flex items-center justify-center font-bold text-lg border-2 border-border shadow-sm">
JD
</div>
{/* Status Avatar */}
<div className="relative">
<div className="w-12 h-12 rounded-full bg-black/5 dark:bg-white/5 flex items-center justify-center border-2 border-border shadow-sm">
<svg fill="currentColor" viewBox="0 0 20 20" className="w-6 h-6 text-muted"><path fillRule="evenodd" d="M10 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z" clipRule="evenodd" /></svg>
</div>
<span className="absolute bottom-0 right-0 w-3.5 h-3.5 bg-green-500 border-2 border-surface rounded-full"></span>
</div>
{/* Avatar Group */}
<div className="flex -space-x-4">
<div className="w-10 h-10 rounded-full border-2 border-surface bg-red-100 flex items-center justify-center text-red-500 font-bold text-xs ring-2 ring-transparent hover:ring-accent transition-all z-10">A</div>
<div className="w-10 h-10 rounded-full border-2 border-surface bg-green-100 flex items-center justify-center text-green-500 font-bold text-xs ring-2 ring-transparent hover:ring-accent transition-all z-20">B</div>
<div className="w-10 h-10 rounded-full border-2 border-surface bg-blue-100 flex items-center justify-center text-blue-500 font-bold text-xs ring-2 ring-transparent hover:ring-accent transition-all z-30">C</div>
<div className="w-10 h-10 rounded-full border-2 border-surface bg-surface flex items-center justify-center text-muted font-bold text-xs z-40 shadow-sm">+9</div>
</div>
</div>
);
}