Skip to main content
Version: 3.4.2

avatar

Props


Child Components

Accessory

Receives either all Icon or Image props.


Reference

activeOpacity

Opacity when pressed

TypeDefault
number0.2

avatarStyle

Style for avatar image

TypeDefault
object (style)none

Component

Component for enclosing element (eg: TouchableHighlight, View, etc)

TypeDefault
functionTouchableHighlight

containerStyle

Styling for outer container

TypeDefault
object (style)none

icon

Displays 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.

TypeDefault
object {name: string, color: string, size: number, type: string (default is material, or choose from supported icon sets), iconStyle: object(style)}none

iconStyle

Extra styling for icon component (optional)

TypeDefault
object (style)none

ImageComponent

Custom ImageComponent for Avatar

TypeDefault
React component or elementImage

imageProps

Optional properties to pass to the avatar e.g "resizeMode"

TypeDefault
{...Image props}none

onLongPress

Callback function when long pressing component

TypeDefault
functionnone

onPress

Callback function when pressing component

TypeDefault
functionnone

overlayContainerStyle

Style for the view outside image or icon

TypeDefault
object (style)none

placeholderStyle

Adds style to the placeholder wrapper

TypeDefault
object (style){ backgroundColor: '#BDBDBD' }

renderPlaceholderContent

Custom placeholder element (by default, it's the title)

TypeDefault
React component or elementnone

rounded

Makes the avatar circular

TypeDefault
booleanfalse

size

Size of the avatar

TypeDefault
string(small, medium, large, xlarge) or numbersmall

source

Image source

TypeDefault
ImageSourcenone

title

Renders title in the placeholder

TypeDefault
stringnone

titleStyle

Style for the title

TypeDefault
object (style)none