Skip to content
Eskais UI

Data

Avatar

UI SDK Avatar with sizes: a real img that falls back to initials while loading or on error.

Example

  • Ada Lovelace
  • Grace Hopper
  • Linus Torvalds

Installation

npx shadcn@latest add @eskais/avatar
npm packagesclass-variance-authority@0.7.1

Usage

Import
import { Avatar, AvatarFallback, AvatarImage, avatarVariants } from "@/components/ui/avatar"

API reference

Avatar

PropTypeDefault
size"xs" | "sm" | "default" | "lg""default"

Also takes every prop of UI SDK Avatar.

Other exports

avatarVariantstype AvatarProps

Accessibility

  • A real img that falls back to initials; hide it when the name is next to it.

Agent actions

Runs agent.snapshot() from @ui-sdk/react/agent on the live preview above.