Avatar
A person's picture with an initials fallback.
Staticimport { Avatar } from 'umbra-ui'
Props
| Prop | Type | Default | Description |
|---|---|---|---|
name required | string | — | Person or entity name. Used for the image alt text and to derive fallback initials. |
shape | "circle" | "square" | circle | Outline shape. |
size | "sm" | "md" | "lg" | md | Diameter. |
src | string | — | Image URL. Falls back to initials while loading or on error. |
Usage notes
Shows src when it loads; otherwise initials derived from name.
Accessibility
- The image's alt text and the fallback's accessible name are both
name.
Import
import { Avatar } from 'umbra-ui';
import 'umbra-ui/styles.css'; // once, at the root of your app