Arihant jain

Avatar

Component 18

About

Here is Avatar component

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, AvatarImage } from "@/components/ui/avatar-1";

export default function Component() {
  return (
    <div className="flex gap-4">
      <div className="relative">
        <Avatar>
          <AvatarImage src="https://cdn.21st.dev/assets/localized/a9e4133bc0492c50e1349ce0f4ddde8ac6f34112b76326655e9259de4dc57895.png" />
          <AvatarFallback>CN</AvatarFallback>
        </Avatar>
        <div className="border-background absolute -end-0.5 -top-0.5 size-3 rounded-full border-2 bg-green-500">
          <span className="sr-only">Online</span>
        </div>
      </div>

      <div className="relative">
        <Avatar>
          <AvatarImage src="https://cdn.21st.dev/assets/localized/a9e4133bc0492c50e1349ce0f4ddde8ac6f34112b76326655e9259de4dc57895.png" />
          <AvatarFallback>CN</AvatarFallback>
        </Avatar>
        <div className="border-background absolute -end-0.5 -bottom-0.5 size-3 rounded-full border-2 bg-red-500">
          <span className="sr-only">Offline</span>
        </div>
      </div>
    </div>
  );
}

Dependencies

More by Arihant jain

View all
  • Footer section

    Footer section

    1.9K
  • Multistep Form

    Multistep Form

    698
  • Animated Drawer

    Animated Drawer

    686
  • Status Badge

    Status Badge

    495
  • Stacked Circular Footer

    Stacked Circular Footer

    413
  • Input Modal

    Input Modal

    316
  • Large Name Footer

    Large Name Footer

    193
  • Profile Dropdown

    Profile Dropdown

    187