Avatar
Avatars represent users or entities with images or placeholders.
Import
import { Avatar } from '@sigx/daisyui';
Basic Usage
Loading preview...
Sizes
Loading preview...
Shapes
Loading preview...
Mask Shapes
Use mask-based shapes for unique avatar outlines.
Loading preview...
Online / Offline Status
Loading preview...
Placeholder
When no image is provided, show initials or text.
Loading preview...
With Ring
Add a ring border around the avatar.
Loading preview...
Avatar Group
Display multiple avatars overlapping.
Loading preview...
Avatar Group with Custom Spacing
Loading preview...
Props
| Prop | Type | Default | Description |
|---|---|---|---|
src | string | undefined | Image URL |
alt | string | 'Avatar' | Alt text for image |
size | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'md' | Avatar size |
shape | 'circle' | 'rounded' | 'square' | 'squircle' | 'hexagon' | 'heart' | 'circle' | Avatar shape |
online | boolean | false | Show online indicator |
offline | boolean | false | Show offline indicator |
placeholder | string | undefined | Text to show when no image (e.g., initials) |
ring | boolean | false | Add ring border |
ringColor | 'primary' | 'secondary' | 'accent' | 'info' | 'success' | 'warning' | 'error' | 'neutral' | 'primary' | Ring border color |
class | string | undefined | Additional CSS classes |
Avatar.Group Props
| Prop | Type | Default | Description |
|---|---|---|---|
spacing | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 8 | 10 | 6 | Overlap spacing |
class | string | undefined | Additional CSS classes |