mohammed-saif-ibrahim

Avatar

Component

About

A circular profile image component that automatically falls back to showing a person's initials when no image is provided or the image fails to load.

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/avatar";

export default function AvatarSizesDemo() {
  return (
    <div className="ui-flex ui-items-center ui-gap-3">
      <Avatar name="Ada Lovelace" size="sm" />
      <Avatar name="Ada Lovelace" size="md" />
      <Avatar name="Ada Lovelace" size="lg" />
    </div>
  );
}

More by mohammed-saif-ibrahim

View all
  • Chart

    Chart

    21
  • Select

    Select

  • Filter Builder

    Filter Builder

  • File Upload

    File Upload

  • Command Palette

    Command Palette

  • Checkbox

    Checkbox

  • Activity Feed

    Activity Feed