Files
shadcn-ui/apps/www/content/docs/components/avatar.mdx
2023-06-22 22:44:52 +04:00

36 lines
616 B
Plaintext

---
title: Avatar
description: An image element with a fallback for representing the user.
component: true
radix:
link: https://www.radix-ui.com/docs/primitives/components/avatar
api: https://www.radix-ui.com/docs/primitives/components/avatar#api-reference
---
<ComponentPreview name="avatar-demo" />
## Installation
<Steps>
### Command
```bash
npx shadcn-ui add avatar
```
### Usage
```tsx
import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar"
```
```tsx
<Avatar>
<AvatarImage src="https://github.com/shadcn.png" />
<AvatarFallback>CN</AvatarFallback>
</Avatar>
```
</Steps>