Avatar

User images with graceful fallbacks, status badges, and overlapping groups.

NS
AK
ML
SP

Import#

import { Avatar } from "astralis-ui";
// Avatar.Group, Avatar.Badge

Usage#

The fallback chain is automatic: src image → initials from name (with a hue derived deterministically from the name, so the same person always gets the same color) → silhouette icon. Avatar.Badge anchors a status dot.

Groups#

NS
AK
ML
+2

Sizes and shapes#

NS
NS
NS
NS
NS
NS
NS
NS

Props#

PropTypeDefaultDescription
src / altstringThe image, with its alt text.
namestringDrives initials and the deterministic hue.
iconReactNodesilhouetteCustom fallback when no image or name.
size"xs" | "sm" | "md" | "lg" | "xl" | "2xl""md"Diameter.
shape"circle" | "rounded" | "square""circle"Outline shape.
colorSchemeall 11 schemesfrom nameExplicit hue override.
ringbooleanfalseBorder ring (automatic inside a Group).

Avatar.Group#

PropTypeDefaultDescription
maxnumberVisible cap; the rest collapse into a "+N" chip.
spacingnumber-8Overlap in pixels.
sizeAvatar sizes"md"Applied to every child.

Avatar.Badge#

PropTypeDefaultDescription
status"online" | "away" | "busy" | "offline""online"Preset dot colors.
colorstringCustom color, overriding status.