UserAvatar

fun UserAvatar(modifier: Modifier = Modifier, style: UserAvatarStyle = UserAvatarStyle.SMALL, fillParentSize: Boolean = false, model: Any? = null, color: Color = Color.Unspecified, isPro: Boolean = false, letter: Char? = null, addon: @Composable AvatarAddonScope.(AvatarAddonItem) -> Unit = {})(source)

A circular profile picture that identifies a user.

When model is null or the load fails, it shows a fallback instead of a blank circle: the letter when given, otherwise a profile silhouette, or a building icon for a pro account.

Online indicator

Letter

Parameters

modifier

applied to the avatar

style

avatar diameter (32dp, 40dp, or 64dp) and matching online badge size

fillParentSize

ignore style and fill the parent; use it when a fixed-size slot already sets the avatar size

model

image to load, for example the user photo URL; null shows the fallback icon

color

background behind the fallback icon; match it to the surface behind the avatar, or leave Color.Unspecified for a transparent background; the letter fallback ignores it

isPro

mark a professional account so the fallback shows a building icon; it shows only in the fallback state, and letter takes precedence over it

letter

first letter of the user name to show on a neutral circle in the fallback state; it renders as given, so pass the case you want; null shows the fallback icon

addon

optional overlay badge slot; call AvatarAddonScope.onlineIndicator for the standard presence dot, or AvatarAddonScope.custom for arbitrary content; defaults to empty