Prerequisites
Bug description
Problem
Avatar corner badges (AvatarCompanyIcon, AvatarOnlineIndicator, VerifiedTick, AvatarCount) use inconsistent size/position rules. Same slot, different contracts.
Inconsistencies
Positioning
- Company:
-right-0.5 -bottom-0.5 (bleeds outside)
- Online / Count / Verified:
right-0 bottom-0
- Verified xs: extra
-right-px -bottom-px in avatar.tsx
AvatarProfilePhoto: inset offsets (bottom-0.5/1/2, right-0.5/1/2) — different from Avatar
Sizing
| Avatar |
Online |
Company |
Verified |
Count |
| xs |
6px |
8px |
10px |
14px fixed |
| 2xl |
16px |
20px |
20px |
14px fixed |
- Online consistently smallest
- Count has no
size prop — doesn't scale with avatar
- Company ≈ Verified but not identical at xs
Styling
- Online + Company:
ring-[1.5px] ring-bg-primary
- Verified: no ring,
z-10
API
status / verified / count built into Avatar
- Company via
badge prop
- Demos pass count as
badge={<AvatarCount />} instead of count prop
Expected
Single badge contract:
- One anchor strategy (flush or bleed — pick one)
- Shared size scale per avatar tier (or documented exception for online dot)
- Count scales or all badges use fixed scale
- Same positioning in
Avatar and AvatarProfilePhoto
Files
components/base/avatar/base-components/avatar-company-icon.tsx
components/base/avatar/base-components/avatar-online-indicator.tsx
components/base/avatar/base-components/verified-tick.tsx
components/base/avatar/base-components/avatar-count.tsx
components/base/avatar/avatar.tsx
components/base/avatar/avatar-profile-photo.tsx
Steps to reproduce
- Open Storybook
- Compare same-size avatars (
xs through 2xl) with each badge type:
status="online"
verified
count={5} or badge={<AvatarCount count={5} />}
badge={<AvatarCompanyIcon ... />}
- Inspect corner badge position and size in devtools
- Repeat with
AvatarProfilePhoto (sm, md, lg) for status and verified
Expected behavior
- All corner badges share one anchor strategy (flush or bleed)
- Badge size scales consistently per avatar tier
- Avatar and AvatarProfilePhoto use same positioning rules
- Ring/styling treatment consistent across badge types
- count prop used uniformly (not mixed with badge prop)
Actual behavior
- Position: Company bleeds (-right-0.5 -bottom-0.5); others flush (right-0 bottom-0); verified xs has extra -1px offset; AvatarProfilePhoto uses inset offsets (bottom-0.5/1/2, right-0.5/1/2)
- Size: Online smallest at every tier; company ≈ verified; count fixed at 14px regardless of avatar size
- Styling: Online + company have ring; verified has no ring, uses z-10
- API: Company/count often passed via badge prop; status/verified/count are built-in props on Avatar
Code example
Browser
No response
Device type
No response
Component version
No response
Environment details
No response
Screenshots/Videos
Console errors
Additional context
No response
Accessibility impact
Prerequisites
Bug description
Problem
Avatar corner badges (
AvatarCompanyIcon,AvatarOnlineIndicator,VerifiedTick,AvatarCount) use inconsistent size/position rules. Same slot, different contracts.Inconsistencies
Positioning
-right-0.5 -bottom-0.5(bleeds outside)right-0 bottom-0-right-px -bottom-pxinavatar.tsxAvatarProfilePhoto: inset offsets (bottom-0.5/1/2,right-0.5/1/2) — different fromAvatarSizing
sizeprop — doesn't scale with avatarStyling
ring-[1.5px] ring-bg-primaryz-10API
status/verified/countbuilt intoAvatarbadgepropbadge={<AvatarCount />}instead ofcountpropExpected
Single badge contract:
AvatarandAvatarProfilePhotoFiles
components/base/avatar/base-components/avatar-company-icon.tsxcomponents/base/avatar/base-components/avatar-online-indicator.tsxcomponents/base/avatar/base-components/verified-tick.tsxcomponents/base/avatar/base-components/avatar-count.tsxcomponents/base/avatar/avatar.tsxcomponents/base/avatar/avatar-profile-photo.tsxSteps to reproduce
xsthrough2xl) with each badge type:status="online"verifiedcount={5}orbadge={<AvatarCount count={5} />}badge={<AvatarCompanyIcon ... />}AvatarProfilePhoto(sm,md,lg) forstatusandverifiedExpected behavior
Actual behavior
Code example
Browser
No response
Device type
No response
Component version
No response
Environment details
No response
Screenshots/Videos
Console errors
Additional context
No response
Accessibility impact