Avatar
Shows a person's photo, falling back to initials or an anonymous person icon.
Show codeHide code
Installation
import { Avatar } from "@makeplane/propel/components/avatar";Usage
import { Avatar } from "@makeplane/propel/components/avatar";
export default function BasicDemo() {
return (
<Avatar size="md" alt="Ada Lovelace" fallback="AL" src="https://i.pravatar.cc/128?img=47" />
);
}Examples
Sizes
size is an optical ramp of eight steps — 2xs 16 / xs 20 / sm 24 / md 28 / lg 32 /
xl 40 / 2xl 56 / 3xl 64 px — not the control ladder. The four middle steps happen to agree
with the ladder’s labels; the extremes are Avatar’s own. md is the default, and inside an
AvatarGroup the group’s size wins unless an avatar sets its own.
Show codeHide code
Variants
The initials background variant is derived stably from alt (falling back to the initials themselves), so every member gets a consistent color automatically — it is not a consumer prop.
Show codeHide code
States
The three fallback states side by side: photo, initials, and the anonymous person icon.
Show codeHide code
API Reference
Avatar
The ready-made avatar: an image that falls back to initials (or an anonymous person icon), composed from the `elements/avatar` parts (`Avatar` root + `AvatarImage` + `AvatarFallback`). Pass `src` for the photo and `fallback` for initials; the initials color is chosen automatically and is not a consumer prop.