Getting StartedComponentsDesign TokensThemingTheme SynthesizerFrameworksAccessibilityUtilitiesServer RenderingBrowser SupportContributingChangelogApp ShellAspect GridAuth ShellCenterContainerDashboard GridFloat BarInsetMasonryPage HeaderPage LayoutResizableResponsive SwitcherSectionSettings LayoutSplit PaneStatus BarStickyToolbarAnchor NavBottom NavBreadcrumbBreadcrumb MenuCommand BarDrawerFooterLinkMenubarNavigation MenuPage IndicatorPaginationRailScroll IndicatorScroll SpyScroll To TopSidebarSkip LinkStepper NavTabsTop BarTree ViewAccordionAspect RatioAvatarAvatar GroupCardCarouselCollapsibleColor SwatchCTA BannerDividerEmpty StateFeature CardIconImageImage CompareImage HotspotsInfinite ScrollLightboxMarqueeQR CodeScroll AreaSkeletonSpinnerStackVideoVirtual ListActivity HeatmapAnimated NumberBadgeBar ListChartClockComparisonCountdown TimerData GridDescription ListDiffGaugeJSON TreeKanbanLevel MeterListMeterSparklineStatStepperTagTimelineUptimeValue CardWaveformBlockquoteCode BlockCode GroupGradient TextHighlightKbdKeyboard MapMarkdownNumber FormatProseTerminalTextTime AgoTruncateTypewriterButtonButton GroupCalendarCheckboxChipColor PickerComboboxCopy ButtonDate PickerDate Range PickerField ListFieldsetFile UploadFormHotkeyIcon ButtonImage CropperInline EditInputInput GroupKnobLabelMasked InputMulti SelectNumber InputPassword InputPin InputRadio GroupRange SliderRatingSearchSegmented ControlSelectSignature PadSliderSortable ListSwitch GroupTag InputTextareaTheme ToggleTime PickerToggleTransfer ListTree SelectAlertAnnouncementBannerCommand PaletteConfirmConnection StatusContext MenuConversationDialogDropdown MenuHover CardLoading OverlayNotification PanelPopoverProgressSheetToastTooltip
ARC UIARC Radiant Components
v4.9DocsComponentsTokensSynthesizer
Getting StartedFrameworksServer RenderingDesign TokensThemingTheme SynthesizerTypographyUtilitiesAll ComponentsAccessibilityBrowser SupportChangelogContributingStatsApp ShellAspect GridAuth ShellCenterContainerDashboard GridFloat BarInsetMasonryPage HeaderPage LayoutResizableResponsive SwitcherSectionSettings LayoutSplit PaneStatus BarStickyToolbarAnchor NavBottom NavBreadcrumbBreadcrumb MenuCommand BarDrawerFooterLinkMenubarNavigation MenuPage IndicatorPaginationRailScroll IndicatorScroll SpyScroll To TopSidebarSkip LinkStepper NavTabsTop BarTree ViewAccordionAspect RatioAvatarAvatar GroupCardCarouselCollapsibleColor SwatchCTA BannerDividerEmpty StateFeature CardIconImageImage CompareImage HotspotsInfinite ScrollLightboxMarqueeQR CodeScroll AreaSkeletonSpinnerStackVideoVirtual ListActivity HeatmapAnimated NumberBadgeBar ListChartClockComparisonCountdown TimerData GridDescription ListDiffGaugeJSON TreeKanbanLevel MeterListMeterSparklineStatStepperTagTimelineUptimeValue CardWaveformBlockquoteCode BlockCode GroupGradient TextHighlightKbdKeyboard MapMarkdownNumber FormatProseTerminalTextTime AgoTruncateTypewriterButtonButton GroupCalendarCheckboxChipColor PickerComboboxCopy ButtonDate PickerDate Range PickerField ListFieldsetFile UploadFormHotkeyIcon ButtonImage CropperInline EditInputInput GroupKnobLabelMasked InputMulti SelectNumber InputPassword InputPin InputRadio GroupRange SliderRatingSearchSegmented ControlSelectSignature PadSliderSortable ListSwitch GroupTag InputTextareaTheme ToggleTime PickerToggleTransfer ListTree SelectAlertAnnouncementBannerCommand PaletteConfirmConnection StatusContext MenuConversationDialogDropdown MenuHover CardLoading OverlayNotification PanelPopoverProgressSheetToastTooltip

Avatar

User avatar with image or initials fallback.

ComponentsAvatar
contentstatic
<arc-avatar>

Overview

Avatar displays a user's profile image inside a circular, bordered container with a hover glow. When an image `src` is provided, it renders an `<img>` element with object-fit: cover and full border-radius. When no image is available, the component falls back to rendering the first character of the `name` property as an uppercase initial inside the circle, using the Tomorrow accent font at weight 600. Three size presets (sm 32px, md 40px, lg 56px) control both the container dimensions and the initials font-size (12px, 14px, and 20px respectively). The container uses a subtle `--border-default` ring that transitions to `--border-bright` on hover, paired with a blue-tinted box-shadow glow, even though the component is presentational. The component sets `role="img"` and `aria-label` on the container, using the `name` property as the accessible label, so screen readers announce an image with the person's name. The exposed CSS parts ("avatar", "img", and "initials") let you override the border, background, or typography for specific contexts like admin badges or status indicators.

Guidelines

When to use

  • Always provide the name prop for accessibility, even when using an image src
  • Use the sm size for compact UI like comment threads and table rows
  • Use the lg size for profile headers and user detail panels
  • Pair with arc-avatar-group to display collections of user avatars
  • Provide a fallback-friendly name so the initial letter is meaningful (e.g. full name, not email)

When not to use

  • Do not omit the name prop; the initial fallback and aria-label both depend on it
  • Do not use Avatar for non-person images like logos or product icons; it is semantically a user avatar
  • Do not set src to a very large image without server-side resizing; the component does not resize images
  • Do not override border-radius on the avatar; the circular shape is part of the component identity
  • Do not rely on the hover glow as a click affordance; Avatar is presentational, not interactive

Features

  • Image display with object-fit: cover for consistent circular cropping
  • Automatic initial-letter fallback when no src is provided
  • Three size presets: sm (32px), md (40px), lg (56px)
  • Hover glow effect with border-color transition and blue box-shadow
  • Accessible `role="img"` with `aria-label` derived from the name property
  • Exposed CSS parts: avatar, img, initials for per-instance customization
  • Uppercase Tomorrow-font initials at weight 600

Preview

Usage

<arc-avatar name="Alice Smith"></arc-avatar>
<arc-avatar name="Bob Jones" size="lg"></arc-avatar>
<arc-avatar src="https://i.pravatar.cc/150?img=1" name="User" size="sm"></arc-avatar>

API

srcstring''
Image URL for the avatar. When provided, renders an <img> element. When empty, displays initials derived from the name prop.
namestring''
User name used to generate initials (first letter, uppercased) and as the alt text / aria-label for the avatar.
size'sm' | 'md' | 'lg''md'
Controls avatar dimensions: sm (32px), md (40px), lg (56px).
status'' | 'online' | 'offline' | 'busy' | 'away'''
Shows a status indicator dot. Empty (the default) shows none. An unrecognised value falls back to empty rather than rendering an uncoloured dot that screen readers announce by its bogus name.
shape'circle' | 'square' | 'rounded''circle'
Controls the avatar shape. Options: 'circle', 'square', 'rounded'.

See Also