GitHub

Avatar

User avatar with image, initials, shapes, and custom sizes.

<rhx-avatar>

Examples

Images

Initials

Shapes

Custom Size

Properties

Property Type Default Description
rhx-image string - URL of the avatar image
rhx-initials string - One or two letter initials (used when no image)
rhx-label string - Accessible label (required)
rhx-size string medium Size: small, medium, large, or any CSS value
rhx-shape string circle Shape: circle, rounded, square

Accessibility

  • Image avatars use alt text from rhx-label for screen reader announcement.
  • Initials avatars use aria-label so screen readers announce the full name, not just the letters.
  • Decorative avatars can use aria-hidden="true" when the identity is conveyed by adjacent text.