Mobile › Display

Avatar

A person's photo, or their initials on a colour picked from their name so each person keeps one colour.

Installation

npx expo install plankui-mobile react-native-safe-area-context expo-haptics

Usage

import { Avatar } from "plankui-mobile";

<Avatar name="Ada Park" />
<Avatar name="Ravi Menon" uri="https://example.com/ravi.jpg" size={56} />

iOS and Android

iOS: A circle, as in Contacts.

Android: A circle, as in Material lists.

API reference

PropTypeDefaultDescription
namestringUsed for initials, colour and the screen-reader label.
uristring–Photo URL.
sizenumber40Diameter.