Avatar

Displays a user avatar with image support or initials fallback.

Preview

Initials
Sizes

Usage

tsx
import { Avatar } from "@semajsx/ui/components/avatar";

// With image
<Avatar src="/photo.jpg" alt="John Doe" />

// With initials fallback
<Avatar initials="JD" />
<Avatar initials="AB" size="lg" />

Props

PropTypeDefaultDescription
srcstringImage source URL
altstringAlt text for the image
initialsstringInitials fallback when no image
size"sm" | "md" | "lg""md"Size preset (32px / 40px / 48px)