[ Data Display ]
Avatar
Shows a person or entity as an image, initials or an icon, in that order, with automatic fallback if the image fails. Add tinted colors (or an automatic color per name), a ring, a live status dot, and animated name tooltips that spring up and tilt toward the cursor. AvatarGroup stacks them with "+N" overflow.
Import#
import { Avatar, AvatarGroup } from 'reusify-ui';When to use#
- Representing people in lists, comments, headers and tables.
- Use status to show presence (online, away, busy, offline) in chat and team views.
- Use AvatarGroup with tooltips to show who is in a team or working on something, with names on hover.
Examples#
[ Basics ]
Image, initials, icon#
Pass name to get initials and an accessible label. A broken src falls back to the initials too.

<Avatar src="https://i.pravatar.cc/120?img=12" name="Aarav Sharma" />
<Avatar name="Mukesh Yadav" />
<Avatar src="/broken.jpg" name="Priya Verma" />
<Avatar />Sizes & shapes#
Six preset sizes (xs to 2xl) or any number of pixels. Shapes: circle (default), squircle and square.
<Avatar size="xs" name="Mukesh Yadav" />
<Avatar size="sm" name="Mukesh Yadav" />
<Avatar size="md" name="Mukesh Yadav" />
<Avatar size="lg" name="Mukesh Yadav" />
<Avatar size="xl" name="Mukesh Yadav" />
<Avatar size="2xl" name="Mukesh Yadav" />
<Avatar size={88} shape="squircle" src="…" name="Priya Verma" />
<Avatar size={88} shape="square" name="Reusify UI" color="primary" />[ Styling ]
Colors#
color tints the initials background. "auto" picks a color from the name, the same one every time, so teams look colorful without any setup. Semantic names and any CSS color work too.
{/* Automatic, stable per name */}
<Avatar name="Aarav Sharma" color="auto" />
<Avatar name="Priya Verma" color="auto" />
<Avatar name="Rohan Gupta" color="auto" />
{/* Semantic or custom */}
<Avatar name="Success Team" color="success" />
<Avatar name="Design" color="#ec4899" />
<Avatar name="Ops" color="oklch(0.65 0.15 220)" />Ring#
ring adds an outline with a small gap. Pass true for the primary color, or any color.
<Avatar ring src="…" name="Aarav Sharma" size="lg" />
<Avatar ring="success" src="…" name="Priya Verma" size="lg" />
<Avatar ring="#f97316" name="Rohan Gupta" color="auto" size="lg" />
<Avatar ring="primary" shape="squircle" name="Isha Patel" color="auto" size="lg" />Status#
status adds a presence dot (online, away, busy, offline) and adds it to the accessible label. statusPulse adds a soft "ping" animation for live presence.
<Avatar src="…" name="Aarav Sharma" status="online" statusPulse />
<Avatar src="…" name="Priya Verma" status="away" />
<Avatar name="Rohan Gupta" color="auto" status="busy" />
<Avatar name="Isha Patel" color="auto" status="offline" />
<Avatar size="2xl" shape="squircle" src="…" name="Kabir Khan" status="online" />[ Animated tooltips ]
Hover an avatar: it lifts, and a name bubble springs up and tilts toward your cursor. Move left and right across it to see the tilt.
Team with animated names#
AvatarGroup tooltips turns it on for every avatar. Each avatar can add a description, like a role.
<AvatarGroup tooltips size="xl" spacing="tight">
<Avatar src="…" name="Aarav Sharma" description="Founder" />
<Avatar src="…" name="Priya Verma" description="Product designer" />
<Avatar src="…" name="Rohan Gupta" description="Frontend engineer" />
<Avatar src="…" name="Isha Patel" description="Data scientist" />
<Avatar src="…" name="Kabir Khan" description="DevOps" />
<Avatar src="…" name="Neha Singh" description="Marketing" />
</AvatarGroup>Single avatar, custom content & accent#
tooltip={true} shows the name; pass any node for custom content. tooltipAccent colors the glowing line along the top of the bubble.
<Avatar tooltip src="…" name="Aarav Sharma" description="Founder" size="xl" status="online" />
<Avatar tooltip="Design lead 🎨" name="Priya Verma" color="auto" size="xl" tooltipAccent="#ec4899" />
<Avatar tooltip name="Rohan Gupta" description="On call this week" color="auto" size="xl" tooltipAccent="#22c55e" ring="success" />Overflow & spacing#
max collapses the rest into "+N". spacing sets the overlap: tight, normal (default), loose, none, or a length.
<AvatarGroup max={4} spacing="tight">…</AvatarGroup>
<AvatarGroup max={4}>…</AvatarGroup>
<AvatarGroup max={4} spacing="loose">…</AvatarGroup>
<AvatarGroup max={4} spacing="none">…</AvatarGroup>[ Light & dark ]
Both themes#
Tints, rings, status dots and the group outline all use theme tokens, so they adapt automatically.
<div className="light">…</div>
<div className="dark">…</div>[ Patterns ]
Comment#
Priya Verma 2m ago
Pushed the new button styles. Can you review?
<div style={{ display: 'flex', gap: 12 }}>
<Avatar src="…" name="Priya Verma" status="online" />
<div>
<strong>Priya Verma</strong> <small>2m ago</small>
<p>Pushed the new button styles. Can you review?</p>
</div>
</div>Project card members#
Website redesign
Due Friday
<Card>
<CardHeader title="Website redesign" subtitle="Due Friday" />
<CardFooter>
<AvatarGroup tooltips max={3} size="sm">…</AvatarGroup>
<Button size="sm" variant="soft">Invite</Button>
</CardFooter>
</Card>Used in designs#
Avatar in real layouts: these 14 designs use it. Open one to try it and copy the code.
- Get started checklistTasks & workflow
- Members ProjectsDashboard widgets
- Upcoming meetingDashboard widgets
- PerformanceDashboard widgets
- Employee spotlightDashboard widgets
- ActivityDashboard widgets
- Invite teammatesAuthentication
- Profile cardSettings & profile
- Challenge inviteSocial & fitness
- Who to followSocial & fitness
- Follow cardSocial & fitness
- Contact cardSocial & fitness
- Event detailsProductivity
- Job cardsProductivity
API reference#
<Avatar />
Also accepts every <span> attribute.
| Prop | Type | Default | Description |
|---|---|---|---|
src | string | - | Image URL. Falls back to initials if it fails to load. |
name | string | - | Used for initials, the accessible label, auto color and the tooltip. |
alt | string | - | Overrides the accessible label. |
size | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | number | 'md' | 24, 32, 40, 48, 64, 80px or any pixel size. |
shape | 'circle' | 'squircle' | 'square' | 'circle' | Corner shape. |
color | 'auto' | semantic | CSS color | - | Tints the initials background. auto derives a stable color from the name. |
ring | boolean | semantic | CSS color | - | Outline ring with a gap. true uses the primary color. |
status | 'online' | 'away' | 'busy' | 'offline' | - | Presence dot, also added to the accessible label. |
statusPulse | boolean | false | Animated ping around the status dot. |
tooltip | boolean | ReactNode | - | Animated name bubble on hover. true shows the name. |
description | ReactNode | - | Second line in the tooltip (e.g. role); also added to the label. |
tooltipAccent | CSS color | --ru-primary | Color of the glowing line along the top of the bubble. |
src-stringImage URL. Falls back to initials if it fails to load.
name-stringUsed for initials, the accessible label, auto color and the tooltip.
alt-stringOverrides the accessible label.
size'md''xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | number24, 32, 40, 48, 64, 80px or any pixel size.
shape'circle''circle' | 'squircle' | 'square'Corner shape.
color-'auto' | semantic | CSS colorTints the initials background. auto derives a stable color from the name.
ring-boolean | semantic | CSS colorOutline ring with a gap. true uses the primary color.
status-'online' | 'away' | 'busy' | 'offline'Presence dot, also added to the accessible label.
statusPulsefalsebooleanAnimated ping around the status dot.
tooltip-boolean | ReactNodeAnimated name bubble on hover. true shows the name.
description-ReactNodeSecond line in the tooltip (e.g. role); also added to the label.
tooltipAccent--ru-primaryCSS colorColor of the glowing line along the top of the bubble.
<AvatarGroup />
| Prop | Type | Default | Description |
|---|---|---|---|
max | number | - | Maximum avatars before collapsing into "+N". |
size | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | number | 'md' | Size for children that do not set their own. |
spacing | 'tight' | 'normal' | 'loose' | 'none' | number | CSS length | 'normal' | How much the avatars overlap. |
tooltips | boolean | false | Animated name tooltips on every avatar (unless one sets its own). |
children | ReactNode | - | <Avatar> elements. |
max-numberMaximum avatars before collapsing into "+N".
size'md''xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | numberSize for children that do not set their own.
spacing'normal''tight' | 'normal' | 'loose' | 'none' | number | CSS lengthHow much the avatars overlap.
tooltipsfalsebooleanAnimated name tooltips on every avatar (unless one sets its own).
children-ReactNode<Avatar> elements.
Accessibility#
- Images get alt text from alt or name; initials and icon fallbacks use role="img" with an aria-label.
- Status and description are part of the accessible label, e.g. "Priya Verma, Designer (Online)".
- The tooltip bubble is visual only (aria-hidden) because its text is already in the label.
- Hover lift, spring and ping animations are turned off when the user prefers reduced motion.
- The "+N" bubble is labelled "N more".