Avatar, User
User avatar primitives - 21 sets across edit button, multi-avatar display, status badges (e.g., "Dạy thay" assignment indicators).
Live preview
Sizes
5 sizes — xs / sm / md / lg / xl. Initials scale proportionally with avatar diameter.
xs
sm
md
lg
xl
Letter placeholder
DOL default — neutral slate (soft style, consistent with Tag/Badge tone). First 1-2 letters extracted from `name` prop.
Khoa Anh
Dương Ổi
Mai Ngọc
Hà Linh
Tuấn Sơn
Quỳnh Mai
Explicit tone
Opt-in tones — brand / info / success / warning / danger / neutral. Use when avatars need semantic role coloring (admin / instructor / student / etc.).
brand
info
success
warning
danger
neutral
Status dots
Presence indicator with white ring separator — online / offline / busy / away.
online
offline
busy
away
Blank + square variants
No `name` → person icon placeholder. `shape=square` extension for non-user contexts (organization, team, brand mark).
blank · md
blank · lg
blank · xl
square · md
square · lg
square · brand
Import & files
Import
import { Avatar, User } from "@dol/ui/avatar";- Source file
packages/@dol/ui/src/avatar/Avatar.tsx
Figma source
Figma source 21 sets
- Page
- Avatar, User
- Sets
- 21 + 4 standalone
- Primary set
-
User card/General· 31 variants Open in Figma →
Showing:
User card/General 11 other sets (+ 9 more not listed)
-
Avatar/Multi avatar display96 variants Figma → -
Badge item/Dạy thay status3 variants Figma → -
Badge item/Leaderboard140 variants Figma → -
Badge item/Myself, me, self, your class3 variants Figma → -
Img lib/Avatar/3D Avatar56 variants Figma → -
Img lib/Avatar/3D cartoon Job56 variants Figma → -
Img lib/Avatar/3D chibi animal56 variants Figma → -
Img lib/Avatar/Cartoon animal1 variants Figma → -
Img lib/Avatar/Character Exercise9 variants Figma → -
Img lib/Avatar/Cinematic Portrait46 variants Figma → -
Img lib/Avatar/DOL Junior Character41 variants Figma →
AI context
AI context
Markdown summary safe to paste into Claude / ChatGPT / Cursor — includes name, status, import, props, axes, examples, figma source.
# Avatar, UserSlug: `avatar-user`Domain: general · Category: displayDesign: stable · Code: coded
## DescriptionUser avatar primitives - 21 sets across edit button, multi-avatar display, status badges (e.g., "Dạy thay" assignment indicators).
## Import```tsimport { Avatar, User } from "@dol/ui/avatar";```Source: `packages/@dol/ui/src/avatar/Avatar.tsx`
## Figma sourcePage: Avatar, UserSets: 21Primary: User card/GeneralOpen: https://www.figma.com/design/DqRd7UQkNGcdvYL5fwZxlf/?node-id=8031-86799Related
Status legend
Status legend
- Stable
- Design + code shipped, full DS parity.
- Partial
- Design ready, some variants/states missing in code.
- Coded
- Implemented in code; design canon may not yet exist.
- Design only / Code only
- One side present; awaiting the other.
Phase 1.X-5.2 detail view — read-only metadata. Code preview + recipe + live demo deferred (need @dol/ui registry integration).