Expo App UIExpo App UI
Components

Avatar

User avatar with image, initials fallback, and optional online/offline status indicator.

Installation

npx expo-app-ui add avatar

Usage

import Avatar from "@/components/ui/avatar";

<Avatar source={{ uri: "https://i.pravatar.cc/100" }} name="Krish Panchani" size="md" />
<Avatar name="Krish Panchani" size="lg" showStatus status="online" />

Props

PropTypeDefaultDescription
sourceImageSourcePropType-Image source
namestring-Used to derive initials fallback
size'xs' | 'sm' | 'md' | 'lg' | 'xl' | number'md'Avatar size
roundedbooleantrueCircle vs squircle
backgroundColorstring'#E5E7EB'Fallback background
textColorstring'#374151'Initials color
status'online' | 'offline' | 'busy' | 'away'-Status indicator color
showStatusbooleanfalseRender the status dot
styleStyleProp<ViewStyle>-Container style override
imageStyleStyleProp<ImageStyle>-Image style override
accessibilityLabelstringAvatar for {name}Screen-reader label

Accessibility

  • accessibilityRole="image"
  • Provides a meaningful default label using name

On this page

Find this useful?

Buy me a coffee