miladjoodi

Avatar

Component

About

A user profile image with a text fallback, plus badge, grouping and size variants for stacking multiple avatars together.

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,
  AvatarBadge,
  AvatarFallback,
  AvatarImage,
} from "@/components/ui/avatar";
import { PlusIcon } from "lucide-react";

export default function AvatarBadgeIconExample() {
  return (
    <Avatar className="grayscale">
      <AvatarImage
        src="https://cdn.21st.dev/assets/localized/8ad46d5c27e21a609660641caae555b945d2482c5c98dc96e19722db8310ed4c.png"
        alt="@pranathip"
      />
      <AvatarFallback>پ‌پ</AvatarFallback>
      <AvatarBadge>
        <PlusIcon />
      </AvatarBadge>
    </Avatar>
  );
}

Dependencies

More by miladjoodi

View all
  • Image Diff Slider

    Image Diff Slider

    36
  • Empty State

    Empty State

  • Phone Input

    Phone Input

  • Button

    Button

  • Item

    Item

  • Signature Pad

    Signature Pad

  • Hover Card

    Hover Card

  • File Upload

    File Upload