Display
SKAvatar
SKAvatar renders a user identity at five sizes with graceful fallback: image, then initials derived from the display name, then a generic icon. An optional presence dot supports collaboration surfaces.
Not yet released. SKAvatar is planned for 1.6.0; the current published release (1.4.0-alpha01) ships SKText and SKTextField only.
Usage
SKAvatar.kt
SKAvatar(
name = "Subodh Gupta",
imageUrl = user.photoUrl,
size = SKAvatarSize.Large,
presence = SKPresence.Online
)Props
| Prop | Type | Default | Description |
|---|---|---|---|
| name | String | — | Used for initials fallback. |
| imageUrl | String? | null | Remote image source. |
| size | SKAvatarSize | Medium | XSmall through XLarge. |
Accessibility
Decorative by default; pass contentDescription when the avatar is the only identity cue.
Theming
Fallback background derives deterministically from the name hash within the palette.
API surface
- SKAvatar
- SKAvatarSize
- SKPresence