React Native · Components
Avatar
Profile photo.
7 exports
Live example
The preview runs in the browser with the web component; the native component takes the same props and looks the same on iOS and Android.
Preview

Code
Events
- Events appear here when you interact with the preview.
AvatarGroup: the rest as +N; names appear on hover
AYMK+2Import
Avatar
componentProfile photo. Shows the name's initials until the photo loads or if it fails; no layout shift, no broken image.
Examples
AvatarGroup
componentOverlapping row of avatars; those that do not fit are counted as "+N".
Examples
AvatarSize
typeAvatar size: 24, 32, 40, 48, 64 pixels (same as web).
AvatarStatus
typeOnline status: the colored dot in the corner.
AvatarProps
interfaceProps of Avatar.
| Name | Type | Default | Description |
|---|---|---|---|
ref? | Ref<ViewRef> | Ref of the underlying native element. | |
src? | string | ImageSourcePropType | null | Photo: a URL or require("./photo.png"). If it fails to load, initials or an icon appear instead. | |
name? | string | The person's name: screen reader name and initials when there is no photo. | |
icon? | IconProp | Icon shown when there is neither a name nor a photo. | |
fallback? | ReactNode | Your own fallback content (instead of the initials). | |
size? | AvatarSize | "md" | Size. See AvatarSize. |
shape? | "circle" | "square" | "circle" | Shape. |
status? | AvatarStatus | Status dot in the corner. See AvatarStatus. | |
effect? | EffectProp | Effect or effects ("pulse", "lift"…). Defaults to appearance.defaults.avatar.effect. See BuiltinEffect. | |
tooltip? | TooltipProp | Tooltip shown on press and hold (e.g. the person's name). See TooltipProp. | |
style? | StyleProp<ViewStyle> | Container style. |
AvatarGroupItem
interfaceA person in AvatarGroup.
| Name | Type | Description |
|---|---|---|
src? | string | ImageSourcePropType | null | Photo. |
name | string | Name. |
tooltip? | TooltipProp | Tooltip shown on press and hold (e.g. name and role). |
AvatarGroupProps
interfaceProps of AvatarGroup.
| Name | Type | Default | Description |
|---|---|---|---|
items | readonly AvatarGroupItem[] | People. | |
max? | number | Maximum avatars shown; the rest are counted as "+3". | |
size? | AvatarSize | "md" | Size. |
style? | StyleProp<ViewStyle> | Container style. |