Skip to main content
Version: 4.0.0-rc.8

Avatar

Avatars are found all over ui design from lists to profile screens. They are commonly used to represent a user and can contain photos, icons, or even text.

Usage

Import

import { Avatar } from '@rneui/themed';

Theme Key

Avatar

Shape

Loading...

Sizes

Loading...

Image Avatar

Loading...

Letter Avatar

Loading...

Props

NameTypeDefaultDescription
ComponentReact ComponentPress handlers present then Pressable else ViewComponent for enclosing element (eg: TouchableHighlight, View, etc).
ImageComponentComponentClass<{}, any>undefinedCustom ImageComponent for Avatar.
avatarStyleImageStyleundefinedStyle for avatar image.
containerStyleView StyleundefinedStyling for outer container.
iconAvatarIconundefinedDisplays an icon as the main content of the Avatar. Cannot be used alongside title. When used with the source prop it will be used as the placeholder.
iconStyleText StyleundefinedExtra styling for icon component.
imagePropsImageProps(Object)undefinedOptional properties to pass to the avatar e.g "resizeMode".
onLongPressFunctionCallback function when long pressing component.
onPressFunctionCallback function when pressing component.
onPressInGestureResponderEventHandlerCalled when a touch is engaged before onPress.
onPressOutGestureResponderEventHandlerCalled when a touch is released before onPress.
overlayContainerStyleText StyleundefinedStyle for the view outside image or icon.
pressablePropsPressableProps except click handlersNone
renderCustomContentReactElement<{}, string | JSXElementConstructor<any>>undefinedCustom element inside the avatar (by default, it's the title).
roundedbooleanfalseMakes the avatar circular.
sizenumber | small | medium | large | xlargesmallSize of the avatar.
sourceImageSourcePropTypeundefinedImage source to be displayed on avatar.
titlestringundefinedRenders title in the placeholder.
titleStyleText StyleundefinedStyle for the title.

Playground

Loading...