Components/Avatar
Binhlaig UI Component

Avatar

A profile image component with fallback initials, sizes, status indicators and grouped layouts.

Installation

Initialize Binhlaig UI once, then install Avatar using the saved installer.

Initialize first

npx binhlaig-ui@latest init
Terminal
npx binhlaig-ui@latest add avatar

Import

Import Avatar primitives from your UI directory.

import {
  Avatar,
  AvatarFallback,
  AvatarGroup,
  AvatarGroupCount,
  AvatarImage,
  AvatarStatus,
} from "@/components/ui/avatar"

Usage

Render the fallback first and place the image above it.

SASai Aung

Fallback

Fallback initials remain visible when the image is missing or fails to load.

SA

Sizes

Use sm, md, lg or xl depending on the layout.

SASASASA

Status

Add a compact presence indicator.

SAonline
SAoffline
SAbusy
SAaway

Avatar Group

Stack multiple avatars and display the remaining count.

SAMMTK+4

Custom Colors

Style the fallback with ordinary utility classes.

SABLUI

Update or Overwrite

Replace an older Avatar source with the latest registry version.

npx binhlaig-ui@latest add avatar --overwrite

API Reference

Main components and custom props available in Binhlaig UI Avatar.

ComponentPurpose
AvatarProfile image container.
AvatarImageProfile image with load failure handling.
AvatarFallbackInitials or fallback icon.
AvatarStatusPresence indicator.
AvatarGroupOverlapping avatar layout.
AvatarGroupCountRemaining people count.
PropValuesDefault
sizesm, md, lg, xlmd
statusonline, offline, busy, awayonline