Components / Avatar

Display

Avatar

stable

User image with initials fallback, presence dot and stacked groups.

since v1.41.1 kB gzip

Preview

Maya ChenJonas ReyesPriya NairTheo LindqvistAmara Osei
JRAO

Installation

npx @strata/cli add avatar

Usage

import { Avatar, AvatarGroup } from "@/components/strata";

<AvatarGroup>
  <Avatar src="/maya.jpg" alt="Maya Chen" />
  <Avatar fallback="JR" alt="Jonas Reyes" />
</AvatarGroup>

Props

PropTypeDefault
src

Image URL.

string—
fallback

Shown while loading or on error.

ReactNode—
size

Diameter.

"xs" | "sm" | "md" | "lg" | "xl""md"
status

Presence dot.

"online" | "away" | "busy" | "offline"—

Accessibility

Was this page helpful?

Documented since v1.4 · components/avatar.mdx