An image element with a fallback for representing the user.
ER
Installation
Usage
<Avatar>
<AvatarImage Src="https://avatar.vercel.sh/blazix" />
<AvatarFallback>BX</AvatarFallback>
</Avatar>Composition
Use the following composition to build an Avatar:
Avatar
├── AvatarImage
├── AvatarFallback
└── AvatarBadgeUse the following composition to build an AvatarGroup:
AvatarGroup
├── Avatar
│ ├── AvatarImage
│ ├── AvatarFallback
│ └── AvatarBadge
├── Avatar
│ ├── AvatarImage
│ ├── AvatarFallback
│ └── AvatarBadge
└── AvatarGroupCountBasic
A basic avatar component with an image and a fallback.
Badge
Use the AvatarBadge component to add a badge to the avatar. The badge is positioned at the bottom right of the avatar.
Use the Class parameter to add custom styles to the badge such as custom colors, sizes, etc.
<Avatar>
<AvatarImage Src="https://avatar.vercel.sh/blazix" alt="@("@blazix")" />
<AvatarFallback>BX</AvatarFallback>
<AvatarBadge Class="bg-green-600 dark:bg-green-800" />
</Avatar>Badge with Icon
You can also use an icon inside <AvatarBadge>.
PP
Avatar Group
Use the AvatarGroup component to add a group of avatars.
LR
ERAvatar Group Count
Use <AvatarGroupCount> to add a count to the group.
LR
ER
Avatar Group with Icon
You can also use an icon inside <AvatarGroupCount>.
LR
ER
Sizes
Use the Size parameter to change the size of the avatar.
Dropdown
You can use the Avatar component as a trigger for a dropdown menu.
RTL
To enable RTL support in Blazix, see the RTL configuration guide.
Translated with AI for the demo, so it may have mistakes.
ER
API Reference
Avatar
Other attributes are passed to the element it renders.
AvatarBadge
Other attributes are passed to the element it renders.
AvatarFallback
Other attributes are passed to the element it renders.
AvatarGroup
Other attributes are passed to the element it renders.
AvatarGroupCount
Other attributes are passed to the element it renders.
AvatarImage
Other attributes are passed to the element it renders.