Reference index

Components

Avatar

Square avatar on Base UI Avatar: hairline frame, greyscale image, initials fallback from props.

Preview

JOJane Okafor

Install

bash

npx shadcn add @eloquent/avatar

Usage

tsx

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

<Avatar>
  <AvatarImage src="/jane.jpg" alt="Portrait of Jane Okafor" />
  <AvatarFallback>JO</AvatarFallback>
</Avatar>

States

JOJOJO
StateTreatment
Image loadedGreyscale image fills the square
Image loading or failedInitials fallback on tint-1
SizesSet size-* through className

Keyboard

This component is not interactive. It is not a tab stop, so Tab skips it.

KeyAction
TabSkips it; not a tab stop

Vietnamese

NANguyễn Thị Ánh

Ink adaptation

Upstream's circle (rounded-full) becomes a square (radius 0) with a 1px ink border. The image is greyscale (grayscale). The fallback is tint-1 with Barlow Condensed capitals.