Components
- Accordion
- Alert
- Alert Dialog
- Aspect Ratio
- Avatar
- Badge
- Breadcrumb
- Button
- Button Group
- Card
- Checkbox
- Collapsible
- Combobox
- Command
- Context Menu
- Dialog
- Dropdown Menu
- Empty
- Field
- Hover Card
- Input
- Input Group
- Input OTP
- Item
- Kbd
- Label
- Native Select
- Pagination
- Popover
- Progress
- Radio Group
- Select
- Separator
- Sheet
- Sidebar
- Skeleton
- Slider
- Sonner
- Spinner
- Switch
- Table
- Tabs
- Textarea
- Toast
- Toggle
- Toggle Group
- Tooltip
- Typography
Get Started
@shadcn/react
@shadcn/helpers
Force UI registry
Utilities
Installation#
pnpm dlx shadcn@latest add @force-ui-ember/avatar
Usage#
import {
Avatar,
AvatarFallback,
AvatarImage,
} from '@/ui/avatar';<Avatar>
<AvatarImage @src="https://github.com/shadcn.png" @alt="@shadcn" />
<AvatarFallback>CN</AvatarFallback>
</Avatar>Composition#
Use the following composition to build an Avatar:
Avatar
├── AvatarImage
└── AvatarFallbackExamples#
Basic#
A basic avatar component with an image and a fallback.
Dropdown#
You can use the Avatar component as a trigger for a dropdown menu.
API Reference#
Avatar#
The Avatar component is the root component that wraps the avatar image and fallback.
| Prop | Type | Default |
|---|---|---|
@class | string | - |
AvatarImage#
The AvatarImage component displays the avatar image.
| Prop | Type | Default |
|---|---|---|
@src | string | - |
@alt | string | - |
@class | string | - |
AvatarFallback#
The AvatarFallback component displays a fallback when the image fails to load.
| Prop | Type | Default |
|---|---|---|
@class | string | - |
Deploy your shadcn/ui app on Vercel
Trusted by OpenAI, Sonos, Adobe, and more.
Vercel provides tools and infrastructure to deploy apps and features at scale.
Deploy to Vercel