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#
| Prop | Type | Default |
|---|---|---|
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
Related media components#
Audio PlayerMinimal React audio player row with a play and pause toggle, title, subtitle and an accessible progress bar. Controlled, so it works with any audio source.CarouselScroll snap React carousel with previous and next buttons, arrow key support and a labelled region. Shows one, two or three slides by breakpoint, no library.File ListA stacked list of file rows showing each name and metadata such as size or date, with an optional download button per item. Good for React attachment lists.File RowA single file row with an icon, a truncated name, an optional meta line and a ghost download button with an accessible label. Styled with Tailwind.Image GalleryA responsive photo grid of square tiles, two columns on mobile and three on larger screens, each image cropped to fill. Built with React and Tailwind.Image LightboxA clickable image thumbnail that opens a full screen modal of the picture with a dimmed backdrop and a close button. Handy for screenshots and product shots.
All media and upload components