Avatar

A user avatar with image support, fallback initials, status indicator, and ring border.

Import

import { Avatar } from "@igorao79/uivix";

Playground

JD
User
48px

Status Indicators

O
online
O
offline
B
busy
A
away

Shapes

AB
CD

Usage

<Avatar
  src="/avatar.jpg"
  fallback="JD"
  status="online"
  shape="circle"
  ring
  size={48}
/>

Props

PropTypeDefaultDescription
srcstring-Image URL for the avatar
altstring-Alt text for the image
fallbackstring"?"Initials shown when no image is available
sizenumber40Avatar size in pixels
shape"circle" | "square""circle"Shape of the avatar
status"online" | "offline" | "busy" | "away"-Status indicator dot
ringbooleanfalseShow a colored border ring
ringColorstring"#8b5cf6"Color of the ring border
classNamestring-Additional CSS classes