Origin UI

Avatar

Component 134

About

Enchanced shadcn/ui avatar

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

function Component() {
  return (
    <div className="relative">
      <Avatar>
        <AvatarImage
          src="https://cdn.21st.dev/assets/localized/c85293bcf45ed2a54cb7a84c5cf813e896edfe01b692eacab8cc9f5547edbfad.jpg"
          alt="Kelly King"
        />
        <AvatarFallback>KK</AvatarFallback>
      </Avatar>
      <span className="absolute bottom-0 end-0 size-3 rounded-full border-2 border-background bg-emerald-500">
        <span className="sr-only">Online</span>
      </span>
    </div>
  );
}

export { Component };

export default Component;

Dependencies

More by Origin UI

View all
  • Dialog

    Dialog

    1.2K
  • useImageUpload

    useImageUpload

    926
  • usePagination

    usePagination

    622
  • Popover

    Popover

    384
  • Button

    Button

    364
  • Command

    Command

    321
  • Accordion

    Accordion

    258
  • Calendar [React Day Picker]

    Calendar [React Day Picker]

    256