Avatar/avatar-standard-

PreviousNext

A avatar/avatar-standard- example

Docs
shadcnblocksblock

Preview

Loading preview…
code/example/avatar/avatar-standard-22.tsx
import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar";

export const title = "Avatar with Multiple Badges";

const Example = () => (
  <div className="relative w-fit">
    <Avatar>
      <AvatarImage
        alt="@haydenbleasel"
        src="https://github.com/haydenbleasel.png"
      />
      <AvatarFallback>HB</AvatarFallback>
    </Avatar>
    <span className="absolute -right-1 -bottom-1 size-3 rounded-full border-2 border-background bg-green-500" />
    <span className="absolute -top-2 -right-2 flex size-5 items-center justify-center rounded-full border-2 border-background bg-red-500 text-xs font-medium text-white">
      3
    </span>
  </div>
);

export default Example;

Installation

npx shadcn@latest add @shadcnblocks/avatar-avatar-standard-22

Usage

import { AvatarAvatarStandard22 } from "@/components/avatar-avatar-standard-22"
<AvatarAvatarStandard22 />