User Account Avatar

An image element with a fallback for representing the user.

Open in v0~1.7 kB

Last updated: March 7, 2026

Installation

npx smoothui-cli add user-account-avatar

Features

  • Image with fallback support
  • Multiple sizes
  • Customizable fallback text
  • Group avatars support
  • Status indicators
  • Built on Radix UI Avatar

Accessibility

Keyboard Interactions

KeyDescription
Enter / SpaceToggle the "Edit Profile" or "Last Orders" sections

ARIA Attributes

AttributeElementPurpose
aria-label="View Order"View order buttonLabels the order detail button for screen readers
htmlForForm labelsAssociates labels with their form inputs
type="button"All buttonsPrevents implicit form submission
type="submit"Save buttonSubmits the profile edit form

Screen Reader

  • The popover is built on Radix UI Popover, which manages focus trapping, return focus, and escape-to-close automatically.
  • Form inputs include proper label elements linked via htmlFor/id attributes.
  • Section toggle buttons include keyboard event handlers (onKeyDown) for Enter and Space keys.
  • The avatar image includes an alt="User Avatar" attribute.

Reduced Motion

This component respects the prefers-reduced-motion media query via useReducedMotion from Motion. When reduced motion is preferred, section expand/collapse animations, progress bar animations, and height transitions are all disabled instantly.

Props