About
An image element with a fallback for representing the user.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Avatar to your project and fits it to your theme.
Code
How Avatar is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
import { Avatar, AvatarFallback } from '@/components/ui/avatar';
import { User } from 'lucide-react';
export default function AvatarDemo() {
return (
<div className="flex gap-6">
<Avatar>
<AvatarFallback>CH</AvatarFallback>
</Avatar>
<Avatar>
<AvatarFallback className="text-destructive bg-destructive/10">AJ</AvatarFallback>
</Avatar>
<Avatar>
<AvatarFallback className="text-primary bg-primary/10">
<User className="size-4" />
</AvatarFallback>
</Avatar>
</div>
);
}







