Skip to content
Mizen UI
Docs

IntroductionInstallationCLIStylingFoundationsThemingCompositionIntegrationsAccessibilityFor agents

useCopyToClipboard

AccordionAspect RatioCardCollapsibleFrameGridGroupInlineScroll AreaSectionSeparatorSpacerStack

BlockquoteCitationCodeHeadingKbdLabelLinkTextVisually Hidden

ButtonButton GroupToggleToggle groupToolbar

CalendarCheckboxCheckbox groupComboboxDate pickerDate range pickerDate-Time InputFieldFieldsetFile UploadFormInputInput groupNumber fieldOTP FieldRadio groupSelectSliderSwitchTextareaTime Input

BreadcrumbMenubarNavigation MenuPaginationSegmented ControlStepperTabs

Alert dialogCommandContext MenuDialogDrawerMenuPopoverPreview CardSheetTooltip

AlertBadgeEmptyError StateMeterProgressSkeletonSpinnerStatus dotToast

Activity FeedAvatarAvatar GroupData TableListMetricOverflow ListProperty ListTableTokenTree

Area ChartBar ListCalendar HeatmapCategory ComparisonChart FrameChart LegendChart TooltipDistributionFunnelHeatmapMetric TrendPart-to-WholeProgress RingsRadar ChartRadial BarsSankey ChartScatter ChartScore GaugeTime Series

Diagram

AttachmentCarouselCode BlockLightboxMarkdownThumbnailTimestamp

Agent ThinkingApproval CardComposerConversationInline CitationMessageMessage ScrollerQuestion CardSourcesStreaming TextSuggestionTask ListTerminalTool Call

On this page

  • Preview
  • Usage
  • Anatomy
  • Examples
  • Generated characters
  • Generated image fallback
  • Project owner
  • Sizes
  • Image and fallback
  • Recommendations
  • Usage boundaries
  • API reference
  • Avatar, AvatarImage, AvatarFallback
  • AvatarCharacter

Data

Avatar

Renders a user avatar image with consumer-provided fallback content.

idle

Usage

import {
	Avatar,
	AvatarCharacter,
	AvatarFallback,
	AvatarImage,
} from "@mizen-labs/ui";

Anatomy

The parts and how they nest, taken from the preview above.

<Avatar>
	<AvatarImage />
	<AvatarFallback />
</Avatar>
<Avatar>
	<AvatarImage />
	<AvatarFallback />
</Avatar>
<Avatar>
	<AvatarImage />
	<AvatarFallback />
</Avatar>
<AvatarCharacter />

Examples

Generated characters

Simple faces derived from stable identity seeds. Shapes, colors, and expressions stay consistent in both themes.

Generated image fallback

Use a generated character when a profile photo cannot load.

Project owner

Sizes

Avatar scales across small, default, and large dimensions with proportional typography.

Image and fallback

Avatar displays a loaded user image and falls back to consumer-supplied content on error.

Recommendations

GuidancePractice
Do

Provide recognizable fallback content and useful image descriptions. Keep sizes consistent within the same context.

Usage boundaries

GuidanceBoundary
Scope

Use Thumbnail for general media. An avatar should not be the only visible identifier for a person.

API reference

Public props from @mizen-labs/ui. Use exported prop types for the complete TypeScript contract.

Avatar, AvatarImage, AvatarFallback

Image avatars with optional colored fallback content.

PropTypeDefaultDescription
size"default" | "lg" | "sm""default"Sets the avatar dimensions.
color"neutral" | "blue" | "purple" | "green" | "orange""neutral"AvatarFallback identity color. Keep the same color for each source.
altstring—Required text alternative describing the avatar image.
keepMountedbooleanfalseKeeps the image element mounted while loading or after an error.
onLoadingStatusChange(status: "idle" | "loading" | "loaded" | "error") => void—Callback fired when the image loading status changes.
delaynumber0Delay in milliseconds before displaying the fallback content.

AvatarCharacter

Standalone SVG character. Import from @mizen-labs/ui or @mizen-labs/ui/avatar. Same exact seed produces the same design without storage, network calls, or random state. Designs can repeat across seeds. Omit label beside visible identity text.

PropTypeDefaultDescription
seedstringRequiredStable identity key. Prefer an immutable user ID. Seeds are case-sensitive.
size"sm" | "default" | "lg""default"24px, 32px, or 40px character.
labelstring—Accessible image name. Without a label, the character is decorative.
PreviousActivity FeedNextAvatar Group
MCARJL

Maya

Alex

Lina

Theo

Sam

Jordan

Robin

Casey

The same seed keeps the same character across sizes and visits. Use a stable user ID.

Maya Chen

Project owner

MC

Maya Chen

Design systems · Northstar launch

SMDFLG
MCJL