Content
Avatar
A person’s initials or photo in a circle.
iOSReact NativeAndroidReact NativeReact Native tier — renders anywhere


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.
| Prop | Type | Default | Description |
|---|---|---|---|
| initials | string | — | Shown in place of the image when there is no |
| size | 'lg' | 'md' | 'sm' | 'md' | The diameter — |
| source | ImageSourcePropType | — | The image, cropped to the circle. |
| testID | string | — | Test identifier, forwarded to the view. |
initials
stringShown 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
ImageSourcePropTypeThe image, cropped to the circle.
testID
stringTest identifier, forwarded to the view.
Platform notes
- Falls back to
initialswhen there is nosource.

