Avatar

Shadcn compatible avatar on Base UI with image and initials fallback, three sizes, a status badge and an overlapping avatar group with a plus count.

src/registry/ui/avatar.tsx/r/avatar.json
AK

Fallback

Installation#

bash
npx shadcn@latest add @minidev/avatar

MiniDev UI is in the shadcn registry directory, so the short form works with no setup. Older CLI versions can use the full URL: npx shadcn@latest add https://ui.minidev.pro/r/avatar.json

Usage#

tsx
import { Avatar } from "@/components/ui/avatar"

export function Example() {
  return (
    <Avatar><AvatarFallback>AK</AvatarFallback></Avatar>
  )
}

API reference#

Avatar props
PropTypeDefault
size"default" | "sm" | "lg""default"

Also accepts every prop of AvatarPrimitive.Root props, passed through to the root element.

Dependencies#

npm

@base-ui/react

Built from

No other MiniDev files
All media and upload components

Learn more