Components
Loading preview...
An easily stylable avatar component built with Base UI components.
npx shadcn@latest add https://21st.dev/r/sean0205/base-avatar-1import { Badge } from '@/components/ui/base-avatar-1';
import { Avatar, AvatarFallback, AvatarImage, AvatarIndicator } from '@/components/ui/base-avatar';
export default function AvatarDemo() {
return (
<div className="flex flex-wrap gap-6">
<Avatar>
<AvatarImage src="https://avatars.githubusercontent.com/u/124599?v=4" alt="@reui" />
<AvatarFallback>CH</AvatarFallback>
<AvatarIndicator className="-end-2 -top-2">
<Badge variant="primary" size="xs" shape="circle" className="border border-background">
6
</Badge>
</AvatarIndicator>
</Avatar>
<Avatar>
<AvatarImage src="https://avatars.githubusercontent.com/u/124599?v=4" alt="@reui" />
<AvatarFallback>CH</AvatarFallback>
<AvatarIndicator className="-end-2 -bottom-2">
<Badge variant="destructive" size="xs" shape="circle" className="border border-background">
3
</Badge>
</AvatarIndicator>
</Avatar>
</div>
);
}