SurfacesNew
Glass Avatar
A round photo that falls back to coloured initials, with a presence dot and stacked groups.
pnpm dlx shadcn@4.14.1 add @glassyui/glass-avatarPreview
Demos ready. Update 0.
Installation
First add the exact @glassyui mapping to components.json as shown in Getting Started. Then run the pinned item command:
pnpm dlx shadcn@4.14.1 add @glassyui/glass-avatarWhat this installs5 files, 2 packages
Direct registry declarations
These values belong to @glassyui/glass-avatar itself in registry.json.
Package dependencies
@radix-ui/react-avatarclsx
Registry dependencies
@glassyui/glass-provider
File targets
components/glassyui/glass-avatar.tsx
Complete installed closure
This follows every namespaced registry dependency recursively and de-duplicates the packages and target files installed with this item.
Package dependencies
@radix-ui/react-avatarclsx
Installed files
components/glassyui/glass-avatar.tsxcomponents/glassyui/glass-provider.tsxcomponents/glassyui/liquid-filters.tsxcomponents/glassyui/lib/preferences.tscomponents/glassyui/styles/liquid.css
Usage
import { GlassAvatar } from "@/components/glassyui/glass-avatar";
export function PersonDemo() {
return <GlassAvatar name="Ada Lovelace" src="/ada.jpg" status="online" />;
}Examples
<GlassAvatarGroup max={4} aria-label="Team">
{people.map((person) => (
<GlassAvatar key={person} name={person} />
))}
</GlassAvatarGroup>API
GlassAvatarA Radix avatar with glass rim, coloured initials and a status dot.
nameNames the person. Its initials fill in for a missing image and pick a stable colour.
src / altThe photo and its description. alt defaults to name.
fallbackReplaces the initials.
sizexs, sm, md (default), lg or xl.
statusonline, away, busy or offline: a presence dot on the corner.
GlassAvatarGroupStacks avatars edge to edge. max shows a +N for the rest; size sizes all of them.
Notes
Cut, not ringed
A status dot or an overlapping neighbour cuts the circle away with a mask instead of drawing a ring in a background colour, so it works over any glass or wallpaper.
Accessibility
The avatar is one image named by alt or name, plus its status. Initials are hidden from assistive technology.
Accessibility
Keep the Radix-backed semantics intact and preserve visible labels, focus states, and keyboard operation when copying the source.
Performance
Use provider quality preferences for dense app screens. Reserve strong refraction for hero or showcase surfaces.