Avatar Badge
Avatar with status indicators or custom badge overlays like flags or icons.
1import { AvatarBadge } from "@/zeroui/components/avatars";23export default function Example() {Badge Positions
1<AvatarBadge badgePosition="top-right" showStatus />2<AvatarBadge badgePosition="top-left" showStatus />3<AvatarBadge badgePosition="bottom-right" showStatus />Custom Badge Content




1<AvatarBadge2 src="/avatar.jpg"3 badgeContent={<img src="https://flagcdn.com/w40/au.png" />}Installation
npx zeroui@latest add avatar-badgeProps
| name | type | default | description |
|---|---|---|---|
| src | string | undefined | - |
| alt | string | "Avatar" | - |
| fallback | string | undefined | - |
| size | "xs" | "sm" | "md" | "lg" | "xl" | "md" | - |
| shape | "circle" | "square" | "circle" | - |
| border | boolean | false | - |
| borderColor | "default" | "white" | "primary" | "default" | - |
| badgeContent | ReactNode | undefined | - |
| badgePosition | "top-right" | "top-left" | "bottom-right" | "bottom-left" | "bottom-right" | - |
| badgeColor | "green" | "red" | "yellow" | "blue" | "gray" | "green" | - |
| showStatus | boolean | false | - |