Sean Hello

Base Avatar

Component

About

An easily stylable avatar component built with Base UI components.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Base Avatar to your project and fits it to your theme.

Code

How Base Avatar is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

import { Avatar, AvatarFallback, AvatarImage, AvatarIndicator, AvatarStatus } from '@/components/ui/base-avatar';

export default function AvatarDemo() {
  return (
    <div className="flex flex-wrap items-center gap-6">
      <Avatar className="size-6">
        <AvatarImage src="https://cdn.21st.dev/assets/mirror/51/513d06f542692036ff0bb17938f04b3efd60567ba2cae08049469d21f18e0524.jpg" alt="@reui" />					
        <AvatarFallback>CH</AvatarFallback>
        <AvatarIndicator className="-end-2 -top-2">
          <AvatarStatus variant="online" className="size-2" />
        </AvatarIndicator>
      </Avatar>
      <Avatar className="size-8">
        <AvatarImage src="https://cdn.21st.dev/assets/mirror/51/513d06f542692036ff0bb17938f04b3efd60567ba2cae08049469d21f18e0524.jpg" alt="@reui" />					
        <AvatarFallback>CH</AvatarFallback>
        <AvatarIndicator className="-end-2 -top-2">
          <AvatarStatus variant="online" className="size-2.5" />
        </AvatarIndicator>
      </Avatar>
      <Avatar className="size-10">
        <AvatarImage src="https://cdn.21st.dev/assets/mirror/51/513d06f542692036ff0bb17938f04b3efd60567ba2cae08049469d21f18e0524.jpg" alt="@reui" />					
        <AvatarFallback>CH</AvatarFallback>
        <AvatarIndicator className="-end-2 -top-2">
          <AvatarStatus variant="online" className="size-2.5" />
        </AvatarIndicator>
      </Avatar>
      <Avatar className="size-14">
        <AvatarImage src="https://cdn.21st.dev/assets/mirror/51/513d06f542692036ff0bb17938f04b3efd60567ba2cae08049469d21f18e0524.jpg" alt="@reui" />					
        <AvatarFallback>CH</AvatarFallback>
        <AvatarIndicator className="-end-1 -top-1">
          <AvatarStatus variant="online" className="size-3" />
        </AvatarIndicator>
      </Avatar>
      <Avatar className="size-20">
        <AvatarImage src="https://cdn.21st.dev/assets/mirror/51/513d06f542692036ff0bb17938f04b3efd60567ba2cae08049469d21f18e0524.jpg" alt="@reui" />					
        <AvatarFallback>CH</AvatarFallback>
        <AvatarIndicator className="-end-px -top-px">
          <AvatarStatus variant="online" className="size-3" />
        </AvatarIndicator>
      </Avatar>
    </div>
  );
}

Dependencies

More by Sean Hello

View all
  • 3D Testimonails

    3D Testimonails

    3.3K
  • Line Charts 9

    Line Charts 9

    637
  • Alert

    Alert

    492
  • Area Charts 1

    Area Charts 1

    385
  • Line Charts 6

    Line Charts 6

    384
  • Scroll Area

    Scroll Area

    376
  • Area Charts 2

    Area Charts 2

    317
  • Navigation Menu

    Navigation Menu

    305