Avatar
Usage
Include CSS
Import Tailwind and one full A3S UI style bundle.
Or import only the base CSS, Avatar component CSS, and one style pack.
Using CDN or bundler imports? See the Installation page.
Add your avatar HTML
Add class="avatar" to a small inline container. Add data-size="sm" or data-size="lg" when needed. Put the image first and a fallback <span> after it. Add .avatar-badge for a status badge or badge icon.
HTML structure
<div class="avatar-group">OptionalOptional parent that groups avatars with overlap.
<span class="avatar">Avatar root. Use it standalone or as a direct child of
.avatar-group. Adddata-size="sm"ordata-size="lg"for alternate sizes.<img>Optional- The avatar image. Provide meaningful
alttext. <span>- Fallback initials or icon.
<span class="avatar-badge">Optional- Status badge positioned at the block-end inline-end corner. It can be empty or contain an icon.
<span data-count>Optional- Count or icon indicator displayed at the end of the group.
Examples
Basic
Badge
Badge with icon
Avatar group
Avatar group count
Avatar group with icon
Sizes
CNCNCN