Skip to main content
161

Search Lumen

Find components, APIs, guides, and recipes.

GitHub
Android docs
Data displayAndroid

Avatar

Display a native image or fallback identity at shared avatar sizes.

Public APILumenAvatarAndroid / Compose

Native example

Use Avatar

Keep image sources native to the platform. Use initials or a short fallback when no image is available.

Avatar rendered in the Android phone emulator Lumen playground
Verified runtime captureAndroid phone emulator
kotlin
LumenAvatar(
    fallback = "SM",
    size = LumenAvatarSize.Lg,
    label = "Santiago Molina"
)

Reference

Public API

The primary shared and platform-specific options exposed by LumenAvatar.

APIValues or typeDefaultDescription
painterPainter?nilProvides the platform-native image source.
fallbackString?Provides fallback text, normally initials.
sizesm · md · lgmdUses a 32, 40, or 56 unit diameter.
labelString?nilNames an identity-bearing avatar.

Native behavior

Design and accessibility

When to use it

Keep image sources native to the platform. Use initials or a short fallback when no image is available.

Accessibility

Supply a label when the avatar conveys identity. Omit it when the same name appears adjacent and the image is decorative.

Shared component

Available on other platforms

React NativeApple / SwiftUI
Android docsCompose module