Documentation Index
Fetch the complete documentation index at: https://mintlify.com/shopware/meteor/llms.txt
Use this file to discover all available pages before exploring further.
Import
Props
The size of the avatar.Options:
2xs, xs, s, m, lSizes:2xs: 16pxxs: 24pxs: 32pxm: 40pxl: 48px
First name of the user. Used to generate initials when no image is provided.
Last name of the user. Used to generate initials when no image is provided.
URL of the avatar image. When provided, displays the image instead of initials.
The shape of the avatar.Options:
circle, squareSlots
Custom content to display inside the avatar. Overrides both image and initials.
Usage Examples
Avatar with Initials
Avatar with Image
Different Sizes
Square Variant
Custom Content
Avatar Group
With Fallback
Color Assignment
The avatar automatically assigns a background color based on the name length:- Colors available: orange, pink, yellow, purple, red, blue, green
- Color is determined by
(firstName.length + lastName.length) % 7 - This ensures consistent colors for the same name
- Different theme support (automatically adapts to light/dark mode)
Accessibility
- The avatar uses
role="img"for semantic meaning - Includes empty
altattribute as it’s typically decorative - Initials are displayed in a
spanwith appropriate test ID - Font size scales proportionally with avatar size (40% of container)