reopt design
DocsExploreTemplatesCanvasToolsPricing
Login
opt-uiopt-chartsopt-datagridopt-editoropt-calendaropt-filemanageropt-chatopt-shellbrandapp-ui
Overview205Core74Shells99Blocks32
Avatar
reopt designreopt design

A design system for the AI era

  • Docs
  • Pricing
  • Releases
  • About
  • Contact
  • Terms of Service
  • Privacy Policy

reopt Inc.Business registration no. 217-88-02453contact@reopt.ai

© 2026 reopt Inc. All rights reserved.

Avatar

Component

Represent users with images, generated initials, accessible status indicators, and avatar groups.

indicator
Related docs
bun add @reopt-ai/opt-ui
Install and import
bash
bun add @reopt-ai/opt-ui
tsx
import { Avatar, AvatarGroup } from "@reopt-ai/opt-ui";

Live preview

Change the width and theme, then interact with the components.

100%

Sizes

XSMLX

Status Indicators

김

online

이

busy

박

away

최

offline

Initials Generation

홍

홍길동

JD

John Doe

A

Alice

No name

Fallback

FU

이미지가 없을 때 커스텀 fallback 표시

이미지 로딩 & 폴백 상태머신

정이

로드 성공 → 이미지

홍

로드 실패 → 이니셜 폴백

이미지는 오프스크린에서 먼저 디코딩되며, 로드 전·실패 시 폴백을 보여줘 broken-image 깜빡임이 없습니다.

반응형 이미지 (srcSet / sizes)

R

DPR에 따라 1x/2x 후보 중 선택됩니다.

Avatar Group

max=4

김이박최+1

max=2

김이+3

Usage guidance

Best practices

  • Provide name for initials when the image fails, and use alt to describe the image's meaning. Limit visible avatars with AvatarGroup.max.

Usage to avoid

  • Do not communicate identity or status through an image or online indicator alone.

Usage examples

Identify a user without an image

Avatar

PropTypeDefaultDescription
srcstring—이미지 URL
altstring—이미지 대체 텍스트
namestring—사용자 이름 (이니셜 생성 및 색상 결정)
size"xs" | "sm" | "md" | "lg" | "xl""md"아바타 크기
fallbackReactNode—이미지 실패 시 표시할 콘텐츠
status"online" | "offline" | "busy" | "away"—상태 인디케이터

AvatarGroup

PropTypeDefaultDescription
maxnumber4최대 표시 개수
size"xs" | "sm" | "md" | "lg" | "xl""md"아바타 크기
childrenRequiredReactNode—Avatar 요소들

컴포넌트 의존 관계

깊이
▲ USED BY (7)task-listactivity-feedteam-member-listaudit-logchat-message-listuser-detailitem-detailAvatar
View test results

테스트 커버리지

2026년 7월 9일8/8 통과
8성공
0실패
8전체
  • 로드된 이미지를 렌더링한다
  • 로드 전에는 이미지 대신 폴백(이니셜)을 보여준다
  • srcSet으로 로드된 이미지를 렌더링한다
  • 이름에서 이니셜을 생성한다
  • 영문 이름에서 이니셜을 생성한다
  • status 인디케이터를 표시한다
  • status를 루트 이미지 이름에 포함하고 상태 점은 장식으로 숨긴다
  • size에 따른 크기를 적용한다

Blocks that use this component

opt-ui

ItemDetail

Blocks

Present an item or product with tags, author information, content, and reviews.

opt-ui

UserDetail

Blocks

Build user profiles with avatars, metrics, gauges, progress indicators, tables, and filters.

Related components

opt-ui

Kbd

Core

Display keyboard shortcuts as inline key badges.

opt-ui

StatCard

Core

Show a metric with its value, change, and supporting description. Omit the change row when no comparison is available.

opt-ui

CompositeZone

Core

Navigate child elements in two dimensions with arrow keys using a Composite container.

opt-ui

Toolbar

Core

Group actions in a toolbar with buttons, separators, and tooltips.

opt-ui

Badge

Core

Display inline status badges with five color variants and an optional status dot.

opt-ui

Spinner

Core

Indicate loading in three sizes, with an aria-hidden mode for decorative use.

PreviousTextareaNextProgress