Components

A graphical representation of a user or profile.

A

Installation

npm install @mijn-ui/react-avatar

Usage

import { Avatar, AvatarFallback, AvatarImage } from "@mijn-ui/react-avatar"
<Avatar>
  <AvatarImage src="https://github.com/shadcn.png" />
  <AvatarFallback>CN</AvatarFallback>
</Avatar>

Avatar Sizes

2xs2xs
xsxs
smsm
mdmd
lglg
xlxl

Avatar Group

AnthonySusieJohn Doe+3

API Reference

Built on Radix UI — all underlying primitive props are forwarded in addition to the props below.

PropTypeDefaultDescription
size"2xs" | "xs" | "sm" | "md" | "lg" | "xl""md"Size of the avatar.
unstyledbooleanfalseOpt out of the default styles to fully customize the component.
classNamesobjectOverride classes per slot (see Style Slots below).
classNamestringAdditional classes for the root element.

Avatar Style Slots

Slot NameTargeted ComponentPurpose
baseAvatarStyles the root Avatar component.
imageAvatarImageStyles the avatar image.
fallbackAvatarFallbackStyles the fallback content when the image is missing.