Skip to main content Home About the Design SystemRoadmap OverviewDesignersDevelopers OverviewColorGridIconographyInteractionsSpacingTypography Overview Global colorBox shadowTypographyBorderOpacitySpaceLengthIconBreakpointsMedia queries All elements Accordion Alert Announcement Audio player Avatar Back to top Badge Blockquote Breadcrumb Button group Button Card Chip Code block Call to action Dialog Disclosure Footer Health index Icon Jump links Menu dropdown Navigation link Navigation (primary) Navigation (secondary) Navigation (vertical) Pagination PopoverPlanned Progress stepper Readtime Scheme toggle Select Site status Skeleton Skip link Spinner Statistic Subnavigation Surface Switch Table Tabs Tag Tile Timestamp Tooltip Video embed OverviewColor PalettesCustomizingDevelopers All PatternsAccordionAlertCall to ActionCardFilterFormLink with iconLogo wallSearch barSticky bannerSticky cardTabsTagTile All Personalization PatternsAnnouncement FundamentalsAccessibility toolsAssistive technologiesCI/CDContentContributorsDesignDevelopmentManual testingResourcesScreen readers Design/code status Release notes Get support

Avatar

OverviewStyleGuidelinesCodeAccessibilityDemos
OverviewStatusWhen to useStatus checklistOverviewStatusWhen to useStatus checklist

Overview

Provides a circular user thumbnail for mastheads, cards, and attribution when you need to visually identify a person. Allows an image, a deterministic pattern, or a default icon. Must not take focus or act as a control; images carry role="presentation". Authors should provide a name via the default slot so screen readers have context.

rh-avatar::part(img) {
  object-position: top;
}
import '@rhds/elements/rh-avatar/rh-avatar.js';
<rh-avatar name="Omar Khayyam" subtitle="Mathematician, Astronomer" src="khayyam.jpg"></rh-avatar>
import { Avatar } from "@rhds/elements/react/rh-avatar/rh-avatar.js";

// NOTE: React 19+ does not require these wrapper imports.
// You can use the custom elements directly as-is.

export const Demo = () => (
  <Avatar name="Omar Khayyam" subtitle="Mathematician, Astronomer" src="khayyam.jpg" />
);

URL to a custom avatar image. Replaces the default icon and any generated pattern. The <img> has role="presentation".

The user's display name. Falls back as default slot content and seeds the deterministic pattern generator when pattern is set.

Auxiliary text such as job title or company. Falls back as default content in the subtitle slot.

Thumbnail position relative to text: 'inline' (default, left of text) or 'block' (stacked above). Both collapse to centered block below 576px.

Type of geometric pattern ('squares' or 'triangles'). Generated deterministically from name so the same name always yields the same pattern. Colors come from the --_colors CSS custom property.

When true, visually hides the name and subtitle via CSS clip while keeping them accessible to screen readers.

Adds a subtle border around the thumbnail when set to 'bordered'.

View source on GitHub

Status

When to use

  • When you need to represent a user who has not provided a photo or image
Image of an avatar group with a photo of a woman and text

Status checklist

© 2026 Red Hat Deploys by Netlify