Measured entry

shadcn-avatar

avatarunclassified

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.

Specimen
Harness screenshot of shadcn-avatar at 375 pixels wide
Harness screenshot at 375 pixels wide. No horizontal overflow recorded.
Harness screenshot of shadcn-avatar at 768 pixels wide
Harness screenshot at 768 pixels wide. No horizontal overflow recorded.
Harness screenshot of shadcn-avatar at 1440 pixels wide
Harness screenshot at 1440 pixels wide. No horizontal overflow recorded.

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.

Harness measurements recorded for shadcn-avatar
BuildOK
MountOK
Console errors0
Uncaught page errors0
Horizontal overflowclean at 375, 768, 1440
Axe critical0
Axe serious0
Axe moderate0
Axe minor0
Gzip marginal33.0 KB (98.5 KB build, 65.5 KB baseline)
Bare modeOK
Provider requiredNO
Demo usedwritten 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

Installation record for shadcn-avatar
Declared dependenciesradix-ui, clsx, tailwind-merge
Missing on installnone
Bare installbuilds and mounts without the shadcn-style helpers
Providerno 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/ui
License
MIT
Record published
2026-08-16

Alternatives

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.