⌘ K

Avatar

Represent people with images, initials, and availability.

Interactive playground

LIVE PREVIEW
JD

Props

Fallback initials.

Accessible image description.

Image URL; empty uses initials.

Avatar shape.

Avatar dimensions.

Availability indicator.

Generated code
import { Avatar } from '@vrum/ui';

<Avatar
  initials={"JD"}
  alt={"Jane Doe"}
  src={""}
  shape={"circle"}
  size={"md"}
  status={"online"}
/>
Copy code

Avatar props

PropTypeDefaultDescription
srcstringnoneImage URL; empty uses initials.
altstring"Avatar"Accessible image description.
fallbackstringnonefallback configuration.
initialsstringnoneFallback initials.
size"xs" | "sm" | "md" | "lg" | "xl""md"Avatar dimensions.
shape"circle" | "square" | "rounded""circle"Avatar shape.
status"online" | "offline" | "busy" | "away"noneAvailability indicator.
defaultCheckedbooleannonedefault checked configuration.
defaultValuestring | number | readonly string[]noneInitial value for an uncontrolled component.
autoFocusbooleannoneauto focus configuration.
classNamestringnoneAdditional CSS classes.
idstringnoneid configuration.
styleCSSPropertiesnoneInline style overrides.
aria-invalidboolean | "false" | "true" | "grammar" | "spelling"noneIndicates the entered value does not conform to the format expected by the application.
aria-labelstringnoneDefines a string value that labels the current element.
childrenReactNodenoneContent rendered inside the component.
onFocusFocusEventHandler<HTMLDivElement>noneon focus configuration.
onBlurFocusEventHandler<HTMLDivElement>noneon blur configuration.
onChangeChangeEventHandler<HTMLDivElement, Element>noneCalled when the input value changes.
onSubmitSubmitEventHandler<HTMLDivElement>noneCalled when the form is submitted.
onKeyDownKeyboardEventHandler<HTMLDivElement>noneon key down configuration.
onClickMouseEventHandler<HTMLDivElement>noneCalled when the control is activated.
onSelectReactEventHandler<HTMLDivElement>noneon select configuration.