Corpora UI
Atoms

Avatar

Identity avatar: an image when one is given, initials otherwise, with a presence badge, a loading skeleton, and story-ring audio states.

Usage

This UI module is also available from @exegia/corpora-ui/ui/avatar.

import { Avatar } from "@exegia/corpora-ui"

<Avatar
  size="lg"
  user={{ firstName: "John", lastName: "Doe", status: "online" }}
/>

API reference

PropTypeDefaultDescription
userTUserType—Identity: firstName/lastName drive the initials, avatarUrl the image, status the badge, verified the check.
size"sm" | "md" | "lg" | "xl" | "xxl""sm"Disc size; the badge and its offset scale with it.
loadingboolean—Forces the skeleton with a dots loader, for when the identity itself is still being fetched.
audio"muted" | "unmuted" | "speaking"—Story ring — "speaking" spins it, "unmuted" holds it dim, "muted" fades it. Omitted, no ring.

Last updated on

On this page