---
title: Avatar
description: An image element with a fallback for representing the user.
links:
doc: https://base-ui.com/react/components/avatar#api-reference
---
## Preview
## Installation
CLI
Manual
```bash
npx @olyx/cli@latest add avatar
```
Install the following dependencies:
```bash
npm install @base-ui/react
```
Copy and paste the following code into your project.
Update the import paths to match your project setup.
## Usage
```tsx
import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar"
```
```tsx
JD
```
## API Reference
### Avatar
Root component. Styled wrapper for `Avatar.Root` from Base UI.
| Prop | Type | Default |
| ------- | -------------------------- | ---------- |
| `size` | `number` | `40` |
| `shape` | `"circle" \| "square"` | `"circle"` |
### AvatarImage
Image element for the avatar. Styled wrapper for `Avatar.Image` from Base UI.
### AvatarFallback
Fallback content displayed when the image fails to load. Styled wrapper for `Avatar.Fallback` from Base UI.
### AvatarBadge
Status indicator badge overlaying the avatar.
| Prop | Type | Default |
| -------- | ---------------------------------------------- | ---------- |
| `status` | `"online" \| "offline" \| "busy" \| "away"` | `"online"` |
### AvatarGroup
Container for displaying multiple avatars with overlap styling.
### AvatarGroupCount
Count indicator showing additional users not displayed. Must be used inside an `Avatar` component within `AvatarGroup`.
## Examples
### Fallback Only
### With Status
### Sizes
### Shapes
### Group