Avatar

media

User representation with image support, fallback to initials, and optional status indicator dot.

import { Avatar } from '@/components/forge'

Preview

Avatar
JD
AK
FG
UI

Code Example

Props

PropTypeDefaultRequiredDescription
srcstring-NoImage URL - shows fallback if undefined or fails
altstring-NoAlt text for the avatar image
fallbackstring-NoInitials or text shown when image is unavailable
size'sm' | 'md' | 'lg' | 'xl''md'NoAvatar diameter
status'online' | 'away' | 'offline'-NoShows a status indicator dot

Variants

smmdlgxl

Accessibility

  • Always provide alt text when using an image
  • Status dot includes visually-hidden text for screen readers

Related Components