Measured entry
shadcn-avatar
A client-side React avatar primitive shipped as copied TypeScript source. It wraps Radix Avatar with image and fallback behavior, then adds Tailwind-based sizing, badges, groups, and overflow counts through the shadcn cn helper and theme tokens.



Measured
Every value below was written by the harness on the run that produced the frames above. None of it is derived from the prose.
| Build | OK |
|---|---|
| Mount | OK |
| Console errors | 0 |
| Uncaught page errors | 0 |
| Horizontal overflow | clean at 375, 768, 1440 |
| Axe critical | 0 |
| Axe serious | 0 |
| Axe moderate | 0 |
| Axe minor | 0 |
| Gzip marginal | 33.0 KB (98.5 KB build, 65.5 KB baseline) |
| Bare mode | OK |
| Provider required | NO |
| Demo used | written from the component source API |
Verdict
A dependable, focused choice for shadcn-style React interfaces. The Radix foundation handles image fallback cleanly, while the added badge and group helpers cover common product UI needs without turning the avatar into a larger profile widget.
Use it if
- You want image loading and fallback initials without building that state handling yourself.
- Your interface needs consistent individual avatars, presence badges, or overlapping avatar groups.
- Your project already uses Tailwind utilities and shadcn-style theme tokens.
Skip it if
- You need a dependency-free avatar made from plain markup and CSS.
- Your project does not use Tailwind and you do not want to translate the utility classes and theme tokens.
- You need richer profile behavior such as menus, upload controls, or status tooltips in one component.
Install
| Declared dependencies | radix-ui, clsx, tailwind-merge |
|---|---|
| Missing on install | none |
| Bare install | builds and mounts without the shadcn-style helpers |
| Provider | no provider required in the harness |
In a non-shadcn project, add Radix UI, clsx, and tailwind-merge; provide the cn class-merging helper; configure Tailwind and the referenced color tokens; and replace the aliased utility import if your project does not define it.
Source and credit
This page is a review, not a copy. The component source lives with its author and this site does not republish it. Read the license before you use anything.
Author repository
github.com/shadcn-ui/uiAlternatives
Other published entries for the avatar pattern, ordered by what they measured: mounts first, then clean axe scans, then bare-mode passes, then the smaller bundle.
- hextaui-avatarminimal-flat
- Renders
- YES
- A11y
- 0
- Gzip
- 32.7KB
- Bare
- pass
- Prov
- NO
- neobrutalism-avatarbrutalism
- Renders
- YES
- A11y
- 0
- Gzip
- 32.7KB
- Bare
- pass
- Prov
- NO
- tripled-native-avatar-expand-shadcnuiminimal-flat
- Renders
- YES
- A11y
- 0
- Gzip
- 75.4KB
- Bare
- pass
- Prov
- NO
- tripled-native-avatar-with-name-shadcnuiminimal-flat
- Renders
- YES
- A11y
- 0
- Gzip
- 75.5KB
- Bare
- pass
- Prov
- NO
- magicui-avatar-circlesbento
- Renders
- YES
- A11y
- 0
- Gzip
- 26.0KB
- Bare
- fail
- Prov
- NO
- 8bitcn-avatarskeuomorphism
- Renders
- YES
- A11y
- 0
- Gzip
- 30.5KB
- Bare
- fail
- Prov
- NO