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 initTerminal
npx binhlaig-ui@latest add avatarImport
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.
SA
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 --overwriteAPI Reference
Main components and custom props available in Binhlaig UI Avatar.
| Component | Purpose |
|---|---|
Avatar | Profile image container. |
AvatarImage | Profile image with load failure handling. |
AvatarFallback | Initials or fallback icon. |
AvatarStatus | Presence indicator. |
AvatarGroup | Overlapping avatar layout. |
AvatarGroupCount | Remaining people count. |
| Prop | Values | Default |
|---|---|---|
size | sm, md, lg, xl | md |
status | online, offline, busy, away | online |