Skip to content
Display

Avatar

Server Component

User image with a fallback.

Import

tsx
import { Avatar } from "@cronus-ui/ui";
bash
npx cronus-ui add avatar

Examples

.cronus

The same component declared in Cronus. Emitted at build time from the audit fixtures — the kernel renders it as HTML with no React.

PortedParity: MatchGeometry 1/1Pixel diff 0 pxLogic 1/1Parity scoreboard
fallback.cronus
app "audit-fixtures" {
  port 5176
}

style {
  preset aurora
  theme dark
}

component AvatarFallback layout:inline style:avatar {
  label "AL"
}

page "/audit/avatar/fallback" type:custom {
  use AvatarFallback
}

API Reference

Generated from the component's exported types.

AvatarProps

Extends ComponentPropsWithoutRef<typeof AvatarPrimitive.Root>

Skip AvatarProps props table
PropTypeDefaultDescription
asChild
boolean—Render as the child element via Slot.
children
ReactNode—Contents of the component.
className
string—Additional class names merged onto the root.

AvatarImageProps

Extends ComponentPropsWithoutRef<typeof AvatarPrimitive.Image>

Skip AvatarImageProps props table
PropTypeDefaultDescription
src
string——
alt
string——
asChild
boolean—Render as the child element via Slot.

AvatarFallbackProps

Extends ComponentPropsWithoutRef<typeof AvatarPrimitive.Fallback>

Skip AvatarFallbackProps props table
PropTypeDefaultDescription
delayMs
number—Delay before showing the fallback.
asChild
boolean—Render as the child element via Slot.
children
ReactNode—Contents of the component.