Avatar
Displays a user's profile picture, initials, or fallback icon.
Installation
Copy the following code into your app directory.
Command
Command
Manual
Manual
uv
Anatomy
Use the following composition to build an Avatar component.
Badge
Use the avatar.badge component to add a badge to the avatar. The badge is positioned at the bottom right of the avatar.
Use the class_Name prop to add custom styles to the badge such as custom colors, sizes, etc.
reflex
Badge with Icon
You can also use an icon inside avatar.badge.
Avatar Group
Use the avatar.group component to add a group of avatars.
Avatar Group Count
Use avatar.group_count to add a count to the group.
Avatar Group with Icon
You can also use an icon inside avatar.group_count.
Sizes
Use the size prop to change the size of the avatar.
Dropdown
You can use the Avatar component as a trigger for a dropdown menu.
API Reference
avatar.root
The avatar.root component is the root component that wraps the avatar image and fallback.
avatar.image
The avatar.image component displays the avatar image. It accepts all Base UI Avatar Image props.
avatar.fallback
The avatar.fallback component displays a fallback when the image fails to load. It accepts all Base UI Avatar Fallback props.
avatar.badge
The avatar.badge component displays a badge indicator on the avatar, typically positioned at the bottom right.
avatar.group
The avatar.group component displays a group of avatars with overlapping styling.
avatar.group_count
The avatar.group_count component displays a count indicator in an avatar group, typically showing the number of additional avatars.