Skip to content
Docs
Components
Avatar

Avatar

Component to represent user, and displays the profile picture, initials or fallback icon.

Import

import { Avatar, AvatarBadge, AvatarGroup } from 'react-native-ficus-ui';

Usage

Props

Extends every Box and Text props.

colorScheme

The colorScheme property, will define background color and text color.

TypeRequiredDefault
stringYesgray

icon

The icon property, icon is used as fallback when name, and src is not specified.

TypeRequired
string, React ElementNo

name

The name property representing the name of the person in the avatar. If src has loaded, the name will be used as the alt attribute of the img, else, the name will be used to create the initials.

TypeRequired
stringNo

size

The size property, defining the size of avatar

TypeRequired
stringNo

src

The src property. The source of avatar image

TypeRequired
stringNo

AvatarGroup props

Extends every Stack props.

size

The size property, defining the size of Avatar childrens

TypeRequired
stringNo

max

The max property, defining the max number of Avatar childrens that should be displayed. If there are more to display, an item indicating the number of others avatars will be displayed

TypeRequired
numberNo

AvatarBadge props

Extends every Box props.