Skip to main content

Overview

Hux UI provides avatar components for displaying user profile images:
  • HuxAvatar - Circular user images with initials fallback and built-in caching
  • HuxAvatarGroup - Display multiple avatars with overlapping layouts

Features

  • Built-in Image Caching - Network images use Flutter’s built-in caching for better performance
  • Loading States - Smooth loading indicators while images load
  • Error Handling - Graceful fallback to initials when images fail to load
  • Offline Support - Cached images work offline

Component Variants

Basic Avatar

Simple avatar with name and initials: Avatar with Initials

Avatar with Network Image

Avatar with network profile image (automatically cached):
Features:
  • Automatic image caching for better performance
  • Wireframe loading state while downloading
  • Graceful fallback to initials if image fails to load

Avatar with Local Asset Image

Avatar with local asset image (instant loading):
Features:
  • Instant loading (no network required)
  • Always available (bundled with app)
  • Perfect for default avatars or placeholder images

Network vs Asset Images

Gradient Avatar

Avatar with beautiful gradient background: Gradient Avatar

Small Avatar

Compact avatar for tight spaces:

Large Avatar

Prominent avatar for important displays:

Extra Large Avatar

Hero avatar for main displays:

Avatar Group

Multiple avatars with overlapping layout: Avatar Group

Spaced Avatar Group

Multiple avatars with spacing between them: Avatar Group

HuxAvatar

With Gradient

Sizes

  • small - Compact avatar
  • medium - Standard avatar (default)
  • large - Prominent avatar
  • extraLarge - Hero avatar

Gradient Variants

  • bluePurple - Blue to purple gradient
  • greenBlue - Green to blue gradient
  • orangeRed - Orange to red gradient
  • purplePink - Purple to pink gradient
  • tealCyan - Teal to cyan gradient

HuxAvatarGroup

Display multiple avatars with overlapping or spaced layouts.
Complete avatar documentation is coming soon. See the example app for more usage patterns.