About
Display user profile images with customizable fallback content.
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 } from "@/components/ui/heroui-avatar";
export default function AvatarDefaultDemo() {
return (
<div className="flex min-h-screen w-full items-center justify-center overflow-hidden bg-background p-8">
<div className="flex items-center gap-4">
<Avatar>
<Avatar.Fallback>JD</Avatar.Fallback>
</Avatar>
<Avatar>
<Avatar.Image
alt="Blue"
src="https://cdn.21st.dev/assets/mirror/de/defa32ddb23b6307c5cb8d701022186645dfcee057d2b0ba9ec1955dea22db70.jpg"
/>
</Avatar>
<Avatar>
<Avatar.Fallback>JR</Avatar.Fallback>
</Avatar>
</div>
</div>
);
}
export { AvatarDefaultDemo };







