Binhlaig UI Component
Avatar
A profile image component with fallback initials, sizes, status indicators and grouped layouts.
Installation
Install Avatar in your project.
Terminal
npx binhlaig-ui@latest add avatarFor project setup, installer selection, dependencies, and advanced installation instructions, see the Installation Guide.
View Installation Guide →Update or Overwrite →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.
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
API 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 |