Skip to content
All components
Primitives

Avatar

Represent a person or entity with an image, readable fallback initials and optional presence.

Four sizes and a presence dot driven by the state scale.

Installation

tdpxl is not an npm dependency of your app. The @tdpxl/cli command (not published to npm yet) copies the source into your project, with the registry items and npm packages it imports.

npx @tdpxl/cli add avatar

Then import it from @/components/ui/avatar. New project? Start with the installation guide.

Examples

Each example is one branch of the official demo, rendered in its own frame. The code is that branch as you would write it, with imports pointing at the default install paths.

Sizes

Compare supported avatar sizes with their image and fallback content. Preserves the complete example's required parts, labels and providers. The example's local state remains owned by that composition.

"use client"

import { Avatar, AvatarFallback } from "@/components/ui/avatar"

export function AvatarSizes() {
  return (
    <div className="flex flex-col items-center gap-6">
      <div className="flex items-end gap-3">
        <Avatar size="xs">
          <AvatarFallback>XS</AvatarFallback>
        </Avatar>
        <Avatar size="sm">
          <AvatarFallback>SM</AvatarFallback>
        </Avatar>
        <Avatar size="md">
          <AvatarFallback>MD</AvatarFallback>
        </Avatar>
        <Avatar size="lg">
          <AvatarFallback>LG</AvatarFallback>
        </Avatar>
      </div>
    </div>
  )
}

Online

Show online presence with its accessible status label. Preserves the complete example's required parts, labels and providers. The example's local state remains owned by that composition.

"use client"

import { Avatar, AvatarFallback } from "@/components/ui/avatar"

export function AvatarOnline() {
  return (
    <div className="flex flex-col items-center gap-6">
      <div className="flex items-center gap-3">
        <Avatar status="online">
          <AvatarFallback>ON</AvatarFallback>
        </Avatar>
      </div>
    </div>
  )
}

Away

Show away presence with its accessible status label. Preserves the complete example's required parts, labels and providers. The example's local state remains owned by that composition.

"use client"

import { Avatar, AvatarFallback } from "@/components/ui/avatar"

export function AvatarAway() {
  return (
    <div className="flex flex-col items-center gap-6">
      <div className="flex items-center gap-3">
        <Avatar status="away">
          <AvatarFallback>AW</AvatarFallback>
        </Avatar>
      </div>
    </div>
  )
}

Busy

Show busy presence with its accessible status label. Preserves the complete example's required parts, labels and providers. The example's local state remains owned by that composition.

"use client"

import { Avatar, AvatarFallback } from "@/components/ui/avatar"

export function AvatarBusy() {
  return (
    <div className="flex flex-col items-center gap-6">
      <div className="flex items-center gap-3">
        <Avatar status="busy">
          <AvatarFallback>BU</AvatarFallback>
        </Avatar>
      </div>
    </div>
  )
}

Offline

Show offline presence with its accessible status label. Preserves the complete example's required parts, labels and providers. The example's local state remains owned by that composition.

"use client"

import { Avatar, AvatarFallback } from "@/components/ui/avatar"

export function AvatarOffline() {
  return (
    <div className="flex flex-col items-center gap-6">
      <div className="flex items-center gap-3">
        <Avatar status="offline">
          <AvatarFallback>OF</AvatarFallback>
        </Avatar>
      </div>
    </div>
  )
}

Group

Arrange multiple avatars as one visual group. Preserves the complete example's required parts, labels and providers. The example's local state remains owned by that composition.

"use client"

import { Avatar, AvatarFallback } from "@/components/ui/avatar"

export function AvatarGroup() {
  return (
    <div className="flex flex-col items-center gap-6">
      <div className="flex -space-x-2">
        <Avatar className="ring-2 ring-white-0">
          <AvatarFallback>CD</AvatarFallback>
        </Avatar>
        <Avatar className="ring-2 ring-white-0">
          <AvatarFallback>EF</AvatarFallback>
        </Avatar>
        <Avatar className="ring-2 ring-white-0">
          <AvatarFallback>+3</AvatarFallback>
        </Avatar>
      </div>
    </div>
  )
}

With name

Show an avatar beside the visible name it represents. The avatar is hidden from assistive technology because the name already identifies the person.

"use client"

import { Avatar, AvatarFallback } from "@/components/ui/avatar"

export function AvatarWithName() {
  return (
    <div className="flex flex-col items-center gap-6">
      <div className="flex w-full max-w-72 items-center gap-3">
        <Avatar aria-hidden="true">
          <AvatarFallback>DW</AvatarFallback>
        </Avatar>
        <div className="flex min-w-0 flex-col">
          <span className="truncate text-label-sm text-strong-950">Dana Whitfield</span>
          <span className="truncate text-paragraph-sm text-sub-600">dana.whitfield@example.com</span>
        </div>
      </div>
    </div>
  )
}

Named group

Stack overlapping avatars inside a named group. The group label lists the people, including the overflow count, in one announcement.

"use client"

import { Avatar, AvatarFallback } from "@/components/ui/avatar"

export function AvatarNamedGroup() {
  return (
    <div className="flex flex-col items-center gap-6">
      <div role="group" aria-label="Project members: Ana Ruiz, Ben Okafor, Chen Li and 3 more" className="flex -space-x-2">
        <Avatar size="sm" aria-hidden="true" className="ring-2 ring-white-0">
          <AvatarFallback>AR</AvatarFallback>
        </Avatar>
        <Avatar size="sm" aria-hidden="true" className="ring-2 ring-white-0">
          <AvatarFallback>BO</AvatarFallback>
        </Avatar>
        <Avatar size="sm" aria-hidden="true" className="ring-2 ring-white-0">
          <AvatarFallback>CL</AvatarFallback>
        </Avatar>
        <Avatar size="sm" aria-hidden="true" className="ring-2 ring-white-0">
          <AvatarFallback>+3</AvatarFallback>
        </Avatar>
      </div>
    </div>
  )
}

Extra large sizes

Compare the xl and 2xl sizes for profile headers. Use xl (56px) and 2xl (64px) in profile headers and detail pages where identity is the focus; keep xs to lg for lists.

"use client"

import { Avatar, AvatarFallback } from "@/components/ui/avatar"

export function AvatarExtraLargeSizes() {
  return (
    <div className="flex flex-col items-center gap-6">
      <div className="flex items-end gap-3">
        <Avatar size="xl">
          <AvatarFallback>XL</AvatarFallback>
        </Avatar>
        <Avatar size="2xl">
          <AvatarFallback>2XL</AvatarFallback>
        </Avatar>
      </div>
    </div>
  )
}

Square shape

Use the square shape for organizations, teams and workspaces. shape="square" scales its corner radius with size. Reserve circles for people so the two kinds of identity stay distinguishable.

"use client"

import { Avatar, AvatarFallback } from "@/components/ui/avatar"

export function AvatarSquareShape() {
  return (
    <div className="flex flex-col items-center gap-6">
      <div className="flex items-end gap-3">
        <Avatar shape="square" size="sm">
          <AvatarFallback>NW</AvatarFallback>
        </Avatar>
        <Avatar shape="square">
          <AvatarFallback>NW</AvatarFallback>
        </Avatar>
        <Avatar shape="square" size="xl">
          <AvatarFallback>NW</AvatarFallback>
        </Avatar>
      </div>
    </div>
  )
}

Bordered

Add a decorative ring around the avatar. bordered draws a thin ring separated by the surface color. It is decorative and does not convey state.

"use client"

import { Avatar, AvatarFallback } from "@/components/ui/avatar"

export function AvatarBordered() {
  return (
    <div className="flex flex-col items-center gap-6">
      <div className="flex items-center gap-4">
        <Avatar bordered>
          <AvatarFallback>LM</AvatarFallback>
        </Avatar>
        <Avatar bordered size="lg" shape="square">
          <AvatarFallback>QA</AvatarFallback>
        </Avatar>
      </div>
    </div>
  )
}

Placeholder icon

Show a placeholder icon when no identity is known yet. The icon is decorative; visually hidden text names the placeholder state, such as an unassigned task or an invited guest.

"use client"

import { UserIcon } from "lucide-react"

import { Avatar, AvatarFallback } from "@/components/ui/avatar"

export function AvatarPlaceholderIcon() {
  return (
    <div className="flex flex-col items-center gap-6">
      <div className="flex items-center gap-3">
        <Avatar>
          <AvatarFallback>
            <UserIcon aria-hidden="true" />
            <span className="sr-only">Unassigned</span>
          </AvatarFallback>
        </Avatar>
        <Avatar size="lg">
          <AvatarFallback>
            <UserIcon aria-hidden="true" />
            <span className="sr-only">Invited guest</span>
          </AvatarFallback>
        </Avatar>
      </div>
    </div>
  )
}

Company badge

Overlay a company logo with AvatarBadge. AvatarBadge sits in the bottom end corner. The logo is an image with an accessible name; the person's name stays visible beside the avatar.

"use client"

import { HexagonIcon } from "lucide-react"

import { Avatar, AvatarBadge, AvatarFallback } from "@/components/ui/avatar"

export function AvatarCompanyBadge() {
  return (
    <div className="flex flex-col items-center gap-6">
      <div className="flex items-center gap-3">
        <Avatar size="lg">
          <AvatarFallback>MP</AvatarFallback>
          <AvatarBadge>
            <HexagonIcon role="img" aria-label="Works at Northwind" className="p-0.5 text-primary-base" />
          </AvatarBadge>
        </Avatar>
        <span className="text-label-sm text-strong-950">Maya Patel</span>
      </div>
    </div>
  )
}

Verified badge

Overlay a verified mark with AvatarBadge. The verified icon has role="img" and an aria-label, so the mark is announced and not conveyed by color or shape alone.

"use client"

import { BadgeCheckIcon } from "lucide-react"

import { Avatar, AvatarBadge, AvatarFallback } from "@/components/ui/avatar"

export function AvatarVerifiedBadge() {
  return (
    <div className="flex flex-col items-center gap-6">
      <div className="flex items-center gap-3">
        <Avatar size="lg">
          <AvatarFallback>JO</AvatarFallback>
          <AvatarBadge className="bg-white-0">
            <BadgeCheckIcon role="img" aria-label="Verified account" className="text-information-base" />
          </AvatarBadge>
        </Avatar>
        <span className="text-label-sm text-strong-950">Jonas Ortega</span>
      </div>
    </div>
  )
}

Group with add button

End an avatar stack with a labelled add button. The named group lists the people; the add action is a separate icon-only Button with its own accessible name and a 32px target.

"use client"

import { PlusIcon } from "lucide-react"

import { Avatar, AvatarFallback } from "@/components/ui/avatar"
import { Button } from "@/components/ui/button"

export function AvatarGroupWithAddButton() {
  return (
    <div className="flex flex-col items-center gap-6">
      <div className="flex items-center">
        <div role="group" aria-label="Reviewers: Ana Ruiz, Ben Okafor and Chen Li" className="flex -space-x-2">
          <Avatar size="sm" aria-hidden="true" className="ring-2 ring-white-0">
            <AvatarFallback>AR</AvatarFallback>
          </Avatar>
          <Avatar size="sm" aria-hidden="true" className="ring-2 ring-white-0">
            <AvatarFallback>BO</AvatarFallback>
          </Avatar>
          <Avatar size="sm" aria-hidden="true" className="ring-2 ring-white-0">
            <AvatarFallback>CL</AvatarFallback>
          </Avatar>
        </div>
        <Button
          iconOnly
          size="xs"
          intent="neutral"
          emphasis="stroke"
          aria-label="Add reviewer"
          className="ms-1 rounded-full border-dashed"
        >
          <PlusIcon />
        </Button>
      </div>
    </div>
  )
}

API reference

Generated from the component's TypeScript signatures. Inherited DOM and primitive props are listed separately.

Avatar

Represent a person or entity with an image and fallback.

Avatar props
PropTypeDefaultDescription
inputMode"search" | "text" | "none" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined—Hints at the type of data that might be entered by the user while editing the element or its contents
aria-describedbystring | undefined—Identifies the element (or elements) that describes the object.
aria-invalidboolean | "false" | "true" | "grammar" | "spelling" | undefined—Indicates the entered value does not conform to the format expected by the application.
aria-labelstring | undefined—Defines a string value that labels the current element.
aria-labelledbystring | undefined—Identifies the element (or elements) that labels the current element.
childrenReact.ReactNode—Represents all of the things React can render.
size"xs" | "sm" | "md" | "lg" | "xl" | "2xl" | null | undefined"md"Visual size of this part: xs (24px), sm (32px), md (40px), lg (48px), xl (56px) or 2xl (64px). Choose a supported size while preserving readable content and usable interaction targets. Defaults to md.
shape"circle" | "square" | null | undefined"circle"Circle for people, square (rounded corners) for organizations, teams or workspaces. Defaults to circle.
borderedboolean | undefined—Draw a thin decorative ring around the avatar, separated by the surface color. Defaults to false.
status"online" | "away" | "busy" | "offline" | undefined—Optional presence indicator: online, away, busy or offline. The rendered indicator exposes the corresponding accessible text.
Inherited props (14)
Avatar inherited props
PropTypeDefaultDescription
classNamestring | undefined—Additional classes for this part. Preserve contrast, visible focus and responsive content when adapting styles.
defaultCheckedboolean | undefined—Initial checked state for a control supporting uncontrolled selection. Inherited DOM typing does not give a layout wrapper checkbox behavior.
defaultValuestring | number | readonly string[] | undefined—Initial value for a control supporting uncontrolled state. Inherited DOM typing alone does not give a layout wrapper input behavior.
autoFocusboolean | undefined—Request automatic focus when the element mounts or the primitive opens, according to its source behavior. Choose initial focus deliberately in context.
idstring | undefined—Stable DOM identifier used by labels, descriptions or other explicit associations.
roleReact.AriaRole | undefined—Semantic role appropriate to the rendered element. Preserve required relationships and keyboard behavior.
onFocusReact.FocusEventHandler<HTMLSpanElement> | undefined—Receive the native focus event. Preserve the component's existing keyboard and focus behavior.
onBlurReact.FocusEventHandler<HTMLSpanElement> | undefined—Receive the native blur event when focus leaves this control.
onChangeReact.ChangeEventHandler<HTMLSpanElement, Element> | undefined—Receive the native change event; read the actual control value or checked state from its event target.
onKeyDownReact.KeyboardEventHandler<HTMLSpanElement> | undefined—Receive keyboard events. Preserve built-in keyboard behavior unless deliberately implementing an accessible alternative.
onClickReact.MouseEventHandler<HTMLSpanElement> | undefined—Receive activation events. The consumer owns the action performed and its result.
onSelectReact.ReactEventHandler<HTMLSpanElement> | undefined—Handle the selection event defined by this part's source signature. DOM text-selection events differ from menu or command activation callbacks.
asChildboolean | undefined—Merge this part into one child instead of its default element. Preserve that child's semantics, ref support and accessibility attributes.
refReact.Ref<HTMLSpanElement> | undefined—Allows getting a ref to the component instance. Once the component unmounts, React will set ref.current to null (or call the ref with null if you passed a callback ref).

AvatarBadge

Small overlay in the bottom end corner for a company logo or a verified mark. It is not announced by itself: give an image alt text, or role="img" with aria-label on an icon, when the badge carries meaning. Do not combine with status.

AvatarBadge props
PropTypeDefaultDescription
inputMode"search" | "text" | "none" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined—Hints at the type of data that might be entered by the user while editing the element or its contents
aria-describedbystring | undefined—Identifies the element (or elements) that describes the object.
aria-invalidboolean | "false" | "true" | "grammar" | "spelling" | undefined—Indicates the entered value does not conform to the format expected by the application.
aria-labelstring | undefined—Defines a string value that labels the current element.
aria-labelledbystring | undefined—Identifies the element (or elements) that labels the current element.
childrenReact.ReactNode—Represents all of the things React can render.
Inherited props (13)
AvatarBadge inherited props
PropTypeDefaultDescription
refReact.Ref<HTMLSpanElement> | undefined—Allows getting a ref to the component instance. Once the component unmounts, React will set ref.current to null (or call the ref with null if you passed a callback ref).
defaultCheckedboolean | undefined—Initial checked state for a control supporting uncontrolled selection. Inherited DOM typing does not give a layout wrapper checkbox behavior.
defaultValuestring | number | readonly string[] | undefined—Initial value for a control supporting uncontrolled state. Inherited DOM typing alone does not give a layout wrapper input behavior.
autoFocusboolean | undefined—Request automatic focus when the element mounts or the primitive opens, according to its source behavior. Choose initial focus deliberately in context.
classNamestring | undefined—Additional classes for this part. Preserve contrast, visible focus and responsive content when adapting styles.
idstring | undefined—Stable DOM identifier used by labels, descriptions or other explicit associations.
roleReact.AriaRole | undefined—Semantic role appropriate to the rendered element. Preserve required relationships and keyboard behavior.
onFocusReact.FocusEventHandler<HTMLSpanElement> | undefined—Receive the native focus event. Preserve the component's existing keyboard and focus behavior.
onBlurReact.FocusEventHandler<HTMLSpanElement> | undefined—Receive the native blur event when focus leaves this control.
onChangeReact.ChangeEventHandler<HTMLSpanElement, Element> | undefined—Receive the native change event; read the actual control value or checked state from its event target.
onKeyDownReact.KeyboardEventHandler<HTMLSpanElement> | undefined—Receive keyboard events. Preserve built-in keyboard behavior unless deliberately implementing an accessible alternative.
onClickReact.MouseEventHandler<HTMLSpanElement> | undefined—Receive activation events. The consumer owns the action performed and its result.
onSelectReact.ReactEventHandler<HTMLSpanElement> | undefined—Handle the selection event defined by this part's source signature. DOM text-selection events differ from menu or command activation callbacks.

AvatarFallback

Fallback content while the avatar image is unavailable. Use readable initials, or a decorative placeholder icon when no identity is known yet.

AvatarFallback props
PropTypeDefaultDescription
inputMode"search" | "text" | "none" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined—Hints at the type of data that might be entered by the user while editing the element or its contents
aria-describedbystring | undefined—Identifies the element (or elements) that describes the object.
aria-invalidboolean | "false" | "true" | "grammar" | "spelling" | undefined—Indicates the entered value does not conform to the format expected by the application.
aria-labelstring | undefined—Defines a string value that labels the current element.
aria-labelledbystring | undefined—Identifies the element (or elements) that labels the current element.
childrenReact.ReactNode—Represents all of the things React can render.
Inherited props (15)
AvatarFallback inherited props
PropTypeDefaultDescription
delayMsnumber | undefined—Delay before avatar fallback content appears while an image is loading.
classNamestring | undefined—Additional classes for this part. Preserve contrast, visible focus and responsive content when adapting styles.
defaultCheckedboolean | undefined—Initial checked state for a control supporting uncontrolled selection. Inherited DOM typing does not give a layout wrapper checkbox behavior.
defaultValuestring | number | readonly string[] | undefined—Initial value for a control supporting uncontrolled state. Inherited DOM typing alone does not give a layout wrapper input behavior.
autoFocusboolean | undefined—Request automatic focus when the element mounts or the primitive opens, according to its source behavior. Choose initial focus deliberately in context.
idstring | undefined—Stable DOM identifier used by labels, descriptions or other explicit associations.
roleReact.AriaRole | undefined—Semantic role appropriate to the rendered element. Preserve required relationships and keyboard behavior.
onFocusReact.FocusEventHandler<HTMLSpanElement> | undefined—Receive the native focus event. Preserve the component's existing keyboard and focus behavior.
onBlurReact.FocusEventHandler<HTMLSpanElement> | undefined—Receive the native blur event when focus leaves this control.
onChangeReact.ChangeEventHandler<HTMLSpanElement, Element> | undefined—Receive the native change event; read the actual control value or checked state from its event target.
onKeyDownReact.KeyboardEventHandler<HTMLSpanElement> | undefined—Receive keyboard events. Preserve built-in keyboard behavior unless deliberately implementing an accessible alternative.
onClickReact.MouseEventHandler<HTMLSpanElement> | undefined—Receive activation events. The consumer owns the action performed and its result.
onSelectReact.ReactEventHandler<HTMLSpanElement> | undefined—Handle the selection event defined by this part's source signature. DOM text-selection events differ from menu or command activation callbacks.
asChildboolean | undefined—Merge this part into one child instead of its default element. Preserve that child's semantics, ref support and accessibility attributes.
refReact.Ref<HTMLSpanElement> | undefined—Allows getting a ref to the component instance. Once the component unmounts, React will set ref.current to null (or call the ref with null if you passed a callback ref).

AvatarImage

Image displayed within the avatar. Provide meaningful alternative text when the image identifies a person or entity.

AvatarImage props
PropTypeDefaultDescription
inputMode"search" | "text" | "none" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined—Hints at the type of data that might be entered by the user while editing the element or its contents
aria-describedbystring | undefined—Identifies the element (or elements) that describes the object.
aria-invalidboolean | "false" | "true" | "grammar" | "spelling" | undefined—Indicates the entered value does not conform to the format expected by the application.
aria-labelstring | undefined—Defines a string value that labels the current element.
aria-labelledbystring | undefined—Identifies the element (or elements) that labels the current element.
childrenReact.ReactNode—Represents all of the things React can render.
Inherited props (16)
AvatarImage inherited props
PropTypeDefaultDescription
classNamestring | undefined—Additional classes for this part. Preserve contrast, visible focus and responsive content when adapting styles.
defaultCheckedboolean | undefined—Initial checked state for a control supporting uncontrolled selection. Inherited DOM typing does not give a layout wrapper checkbox behavior.
defaultValuestring | number | readonly string[] | undefined—Initial value for a control supporting uncontrolled state. Inherited DOM typing alone does not give a layout wrapper input behavior.
autoFocusboolean | undefined—Request automatic focus when the element mounts or the primitive opens, according to its source behavior. Choose initial focus deliberately in context.
idstring | undefined—Stable DOM identifier used by labels, descriptions or other explicit associations.
roleReact.AriaRole | undefined—Semantic role appropriate to the rendered element. Preserve required relationships and keyboard behavior.
onFocusReact.FocusEventHandler<HTMLImageElement> | undefined—Receive the native focus event. Preserve the component's existing keyboard and focus behavior.
onBlurReact.FocusEventHandler<HTMLImageElement> | undefined—Receive the native blur event when focus leaves this control.
onChangeReact.ChangeEventHandler<HTMLImageElement, Element> | undefined—Receive the native change event; read the actual control value or checked state from its event target.
onKeyDownReact.KeyboardEventHandler<HTMLImageElement> | undefined—Receive keyboard events. Preserve built-in keyboard behavior unless deliberately implementing an accessible alternative.
onClickReact.MouseEventHandler<HTMLImageElement> | undefined—Receive activation events. The consumer owns the action performed and its result.
onSelectReact.ReactEventHandler<HTMLImageElement> | undefined—Handle the selection event defined by this part's source signature. DOM text-selection events differ from menu or command activation callbacks.
asChildboolean | undefined—Merge this part into one child instead of its default element. Preserve that child's semantics, ref support and accessibility attributes.
altstring | undefined—Text alternative for the image. Identify informative images; use an empty alternative only when the image is genuinely decorative.
srcstring | undefined—Image source URL. Supply alternative text appropriate to whether the image conveys identity or is decorative.
refReact.Ref<HTMLImageElement> | undefined—Allows getting a ref to the component instance. Once the component unmounts, React will set ref.current to null (or call the ref with null if you passed a callback ref).

Accessibility & usage

From registry/ui/avatar.meta.json (authored guidance; human review may still be pending). Behavior is checked by Storybook tests, not certified here.

When to use

  • Next to a name in comments, messages, assignee fields, account menus and member lists, to make people faster to recognise.
  • As a stacked group to show who is involved in a project or conversation, with an overflow count.
  • To show presence (online, away, busy, offline) for people in real-time collaboration features.

When not to use

  • As the only way to identify someone; two people can share initials or a similar photo. Show the name too.
  • For product images, logos inside content or illustrations; those are media, not identity.
  • As a button by itself; wrap it in a real button or link with an accessible name when it opens a profile or menu.

Anatomy

Avatar
Radix Avatar root in sizes xs (24px), sm (32px), md (40px, default), lg (48px), xl (56px) and 2xl (64px). shape is circle (people, default) or square (organizations, teams, workspaces, with a radius that scales with size); bordered adds a decorative outer ring. Optional status renders the presence dot.
AvatarImage
The picture. Rendered only once it has loaded; give it alt text unless the name is visible beside it, then use alt="".
AvatarFallback
Initials or another short identifier shown while the image loads, when it fails, or when there is no image. A child SVG becomes a half-size placeholder icon; pair it with visually hidden text that names the state.
Status indicator
Rendered by the status prop: a dot with role="img" and aria-label set to online, away, busy or offline.
AvatarBadge
Optional overlay in the bottom end corner for a company logo or a verified mark, sized relative to the avatar with a separating ring. It has no semantics of its own: give a logo image alt text, or an icon role="img" and aria-label. Do not combine with status in the same corner.
Add action
Composition: an icon-only Button with an accessible name placed after a named avatar stack, such as Add reviewer. It is a sibling of the group, not part of the stack.

Keyboard & interaction

  • Avatar is passive: it is not focusable and has no keyboard behavior of its own.
  • Image loading is handled by Radix: the fallback stays visible until the image loads, and returns if the image fails.
  • Presence is not a live region; a status change is not announced. Announce important presence changes elsewhere if needed.
  • To make an avatar open a profile or menu, place it inside a Button (iconOnly, with aria-label) or a link.

Responsive behavior

  • Sizes are fixed and do not scale with the container; use xs or sm in dense lists and on small screens, md or lg in headers and profiles.
  • When an avatar is the whole touch target, wrap it in a control that is at least 24x24 CSS pixels and preferably 44x44 (WCAG 2.5.8); the xs avatar alone is only 24px.
  • In stacked groups, show three to five avatars and an overflow count instead of letting the stack grow past the container width.
  • Next to a name, let the name truncate (min-w-0 on its container), never the avatar.

Content guidelines

  • Fallback: one or two uppercase initials from the person's name; for teams or bots use a short meaningful identifier.
  • Alt text: the person's name when the avatar stands alone; empty alt (or aria-hidden on the avatar) when the name is printed next to it.
  • Name a stacked group with role="group" and an aria-label that lists who is included and how many more.
  • Presence labels are the status value itself ('online', 'away'); keep the vocabulary consistent with the rest of the product.
  • Verified marks and company logos need an accessible name ("Verified account", "Works at Northwind"); never rely on the badge shape or color alone.
  • Placeholder icons get visually hidden text that names the state, such as Unassigned or Invited guest.

Alternatives

  • Aspect ratio — Media such as product photos or thumbnails that need a fixed shape.
  • Badge — A textual status that is not about a person's presence.
  • Item — A full row with avatar, name, detail and actions.

Resources