Avatar
A user profile image component with fallback support and accessible image loading.
npx @slipstream-ui/cli@latest add avatarVariants
JD
With image
JD
Fallback only
AI
Custom size
Sizes
AIAI
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| Avatar | className | — | Additional CSS classes |
| AvatarImage | src, alt | — | Image URL and alt text |
| AvatarFallback | children, className | — | Fallback content and styling |
Accessibility
- AvatarImage requires alt text for accessibility
- AvatarFallback content is announced when image fails
- Radix Avatar handles image loading errors automatically
- Use meaningful alt text describing the person
Browser support
| Browser | Tested versions |
|---|---|
| Chrome | 111+ (Mar 2023) |
| Edge | 111+ (Mar 2023) |
| Firefox | 121+ (Dec 2023) |
| Safari | 17.2+ — macOS & iOS (Dec 2023) |
Slipstream components rely only on CSS custom properties, Flexbox/Grid, and ARIA — the everyday baseline of the last two years of evergreen releases. Anything newer is progressive enhancement: unsupported browsers keep full functionality with static behavior instead of animations.