Content

Avatar

A person’s initials or photo in a circle.

iOSReact NativeAndroidReact NativeReact Native tier — renders anywhere
Avatar on iOS
iOSReact Native
Avatar on Android
AndroidReact Native

Import

ts
import {Avatar} from '@hzblj/kara-ui'

Props

A round avatar: the image in source, or initials without one. The React Native tier — it needs no host.

PropTypeDefaultDescription
initialsstring—

Shown in place of the image when there is no source.

size'lg' | 'md' | 'sm''md'

The diameter — sm is s24, md s40, lg s64. md by default.

sourceImageSourcePropType—

The image, cropped to the circle.

testIDstring—

Test identifier, forwarded to the view.

initials
string

Shown in place of the image when there is no source.

size'md'
'lg' | 'md' | 'sm'

The diameter — sm is s24, md s40, lg s64. md by default.

source
ImageSourcePropType

The image, cropped to the circle.

testID
string

Test identifier, forwarded to the view.

Platform notes

  • Falls back to initials when there is no source.