Skip to content
DocsTemplatesThemesComponentsPlayground
Get started
Type to search
↑↓Navigate↵SelectEscClose
Documentation
Documentation
Changelog
What's New
Guide
Guide
Getting Started
Principles
Styling Components
Theme System
Working with AI
Foundations
All Tokens
Color
Elevation
Icons
Illustrations
Motion
Shape
Spacing
Typography
Libraries
Libraries
@xds/cli
@xds/core
Themes
Themes
Chocolate Theme
Theme: daily
Default Theme
Gothic Theme
Theme: matcha
Neutral Theme
Stone Theme
Components
Components
AppShell
AspectRatio
Avatar
Avatar
AvatarGroup
AvatarGroupOverflow
AvatarStatusDot
Badge
Banner
Blockquote
Breadcrumbs
BreadcrumbItem
Breadcrumbs
Button
Button
ButtonGroup
IconButton
ToggleButton
ToggleButtonGroup
Calendar
Card
Carousel
Chat
ChatComposer
ChatComposerDrawer
ChatComposerInput
ChatComposerTokenElement
ChatDictationButton
ChatLayout
ChatLayoutScrollButton
ChatMessage
ChatMessageBubble
ChatMessageList
ChatMessageMetadata
ChatSendButton
ChatSystemMessage
ChatTokenizedText
ChatToolCalls
Checkbox
CheckboxInput
CheckboxList
CheckboxListItem
CircularProgress
ClickableCard
Code
CodeBlock
Collapsible
Collapsible
CollapsibleGroup
useXDSCollapsible
CommandPalette
CommandPalette
CommandPaletteEmpty
CommandPaletteFooter
CommandPaletteGroup
CommandPaletteInput
CommandPaletteItem
CommandPaletteList
ContextMenu
ContextMenu
ContextMenuItem
DateInput
DateRangeInput
DateTimeInput
Dialog
AlertDialog
Dialog
DialogHeader
useXDSImperativeAlertDialog
useXDSImperativeDialog
Divider
DropdownMenu
DropdownMenu
DropdownMenuItem
EmptyState
Field
Field
FieldLabel
FieldStatus
InputGroup
InputGroupText
FileInput
Heading
HoverCard
HoverCard
useXDSHoverCard
Icon
Item
Kbd
Layout
Center
FormLayout
Grid
GridSpan
HStack
Layout
LayoutContainer
LayoutContent
LayoutFooter
LayoutHeader
LayoutPanel
Section
StackItem
VStack
Lightbox
Link
List
List
ListItem
Markdown
MetadataList
MetadataList
MetadataListItem
MobileNav
MoreMenu
NavHeadingMenu
NavIcon
NumberInput
OverflowList
Pagination
Popover
Popover
useXDSPopover
PowerSearch
ProgressBar
Radio
RadioList
RadioListItem
Resizable
ResizeHandle
useXDSResizable
SegmentedControl
SegmentedControl
SegmentedControlItem
SelectableCard
Selector
MultiSelector
Selector
SelectorOption
SideNav
SideNav
SideNavCollapseButton
SideNavHeading
SideNavItem
SideNavSection
Skeleton
Slider
Spinner
StatusDot
Stepper
Step
Stepper
Switch
Table
BaseTable
Table
TableCell
TableHeaderCell
TableRow
useXDSTableColumnSettings
useXDSTablePagination
useXDSTableSelection
useXDSTableSelectionState
useXDSTableSortable
Tabs
Tab
TabList
TabMenu
Text
TextArea
TextInput
Thumbnail
TimeInput
Timestamp
Toast
Toast
useXDSToast
Token
Tokenizer
Toolbar
Tooltip
Tooltip
useXDSTooltip
TopNav
TopNav
TopNavHeading
TopNavItem
TopNavMegaMenu
TopNavMegaMenuFeaturedCard
TopNavMegaMenuItem
TopNavMenu
TreeList
Typeahead
BaseTypeahead
Typeahead
TypeaheadItem
Utilities
Utilities
LinkProvider
MediaTheme
SyntaxTheme
Theme
useClickableContainer
useEntryAnimation
useFocusTrap
useGridFocus
useImageMode
useInputContainer
useListFocus
useMediaQuery
useOverflow
useScrollLock
useScrollOverflow
useXDSLayer
useXDSStreamingText
Copyright © Meta Platforms, Inc.GitHub Pages | Terms of Use | Privacy Policy
Avatar@xds/core v0.0.14 · XDSAvatar

Usage

Avatar represents a person or team with a profile photo, initials, or a default icon. Use it in comment headers, contact lists, chat messages, user cards, and anywhere you need to identify someone visually.
ts
import {XDSAvatar} from '@xds/core/Avatar'

Best practices

GuidancePractices
DoAlways pass a name so the avatar can show initials if the photo fails to load, and so screen readers can announce who it represents.
DoPick a size that matches the context — tiny or xsmall for inline mentions, small or medium for lists and cards, large for profile headers.
DoAdd a status dot when knowing someone's availability matters, like in chat or team views.
Don'tUse Avatar for logos, product images, or anything that isn't a person or team — use an image or icon instead.
Don'tForce a square or custom shape — avatars are always circular to stay consistent across the system.

Examples

Common configurations, variations, and states.
Avatar — Fallback Chain
Demonstrates the avatar fallback chain: primary image, fallback image, initials, then default icon.
Avatar — Group
Overlap multiple avatars in a row to represent a group of people. Use for team lists, PR reviewers, or participant counts where you want to show faces without taking up much space.
Avatar — Initials
Show initials instead of a photo. The avatar extracts the first and last initials from the name automatically. Use when you only have a user name, like in anonymous accounts or new user onboarding.
Avatar — User Card
Place an avatar next to a name and role to create a user card row. Use for comment headers, contact lists, profile sections, or anywhere you need to identify a person at a glance.
Avatar — Photo
Show a profile photo at different sizes. Use when you have a user photo URL. If the image fails to load, initials are shown instead.
Avatar — Status Dot
Add a status dot to an avatar to show whether someone is online, away, or busy. Use in chat, messaging, or any UI where knowing availability matters.