StacklyUI
Components/Avatar

Avatar

An image element with a text fallback.

01

Preview & playground

Edit the code — the preview updates live. Try changing props, text, or classes.

playground.tsx
render(
  <div className="flex items-center gap-3">
    <Avatar><AvatarFallback>SB</AvatarFallback></Avatar>
    <Avatar className="h-12 w-12"><AvatarFallback>UI</AvatarFallback></Avatar>
    <Avatar className="h-8 w-8"><AvatarFallback className="text-xs">3D</AvatarFallback></Avatar>
  </div>
)
02

Installation

Copy the source into your project with the registry CLI:

$pnpm dlx shadcn@latest add @stacklyui/avatar

Or install the package and import it:

$pnpm add @stacklyui/ui motion
03

Usage

Import Avatar from "@stacklyui/ui" and compose it as shown in the playground above. Every interactive primitive is built on Radix, so keyboard navigation, focus management, and ARIA are handled for you.