🎉Paper UI v2.0 is here!
See what's new

PU-Avatar Component

A flexible avatar component with support for images, fallback content, and multiple styling options

Usage

Basic Usage

Avatar
Avatar
Avatar
Avatar
Avatar
Avatar
Avatar
Avatar
Avatar
Avatar
Avatar
Avatar
Avatar
Avatar
Avatar
Avatar
Avatar
Avatar
Avatar
Avatar
Avatar
Avatar
Avatar
Avatar
PropTypeRequiredDefaultDescription
srcstringNoundefinedImage source URL
sizesmall | medium | large | xlargeNomediumSize of the avatar
shapecircular | rounded | squareNocircularShape of the avatar
  • Base styling with Tailwind:
    .avatar {
      @apply flex items-center justify-center overflow-hidden border-2 border-black;
    }
    
    .avatar img {
      @apply w-full h-full object-cover;
    }
    
  • Size classes:
    .small { @apply w-8 h-8; }
    .medium { @apply w-12 h-12; }
    .large { @apply w-16 h-16; }
    .xlarge { @apply w-24 h-24; }
    
  • Shape classes:
    .circular { @apply rounded-full; }
    .rounded { @apply rounded-lg; }
    .square { @apply rounded-none; }
    
  • Multiple size options
  • Customizable shapes
  • Fallback content for missing images
  • Border styling
  • Responsive design
  • Tailwind CSS for styling