Avatar

Avatars are a visual way to represent a person or business in a user interface. Using avatars encourages empathy and builds trust between recipients, merchants, and consumers.

TypeResource
DesignFigma
MobileMobile Storybook
CodeGitlab
Avatar Preview

Usage

import id.co.biofarma.binduiandroid.components.avatar.Avatar
Avatar(
    type = "text",
    variant = "default",
    text = "John Doe",
    size = "md",
    mode = "light",
    badgeStatus = null,
    showBadge = false
)

Examples

Size (optional)

Use size xs, sm, md, lg, xl, or 2xl to determine the size of the avatar.

Avatar Example Size

Badge (optional)

Use showBadges true to show the badge status of the avatar

Avatar Example Badge

Type (optional)

Type for avatar text, avatar image, or avatar icon to use avatar type.

Avatar Example Type

Mode (optional)

Use mode to use dark or light.

Avatar Example Mode

Props

PropsRequiredDefaultTypedescription
idfalse-stringA unique identifier for the avatar.
variantfalsedefaultdefault , info , success , warning , dangerUnique identifier for avatar with a specific color.
sizefalsemdxs, sm, md, lg, xl , 2xlThe size of avatar component (xs, sm, md, lg, xl, 2xl).
modefalselightlight darkThe theme mode of the avatar (light or dark).
stylefalse-ModifierCustom styles for the avatar component.
textfalse-stringA unique identifier to change the initials of the name on the avatar.
imageUrlfalse-stringA unique identifier for changing the image link.
iconfalse-@Composable (() -> Unit)? = nullUnique identifier to change the icon avatar.
typefalsetexttext , image , iconUnique identifier for avatar with a specific type of avatar.
showBadgefalsefalsebooleanIf true, badge will be set to showing badge.
badgeStatusfalseonlineonline , offline , busy , idle , workingUnique identifier for avatar with a specific badge status.
BIND © Biofarma Innovate Next-level Design .