Skip to content

Avatar ​

A circular (or shaped) user representation that renders an image, falls back to initials, and falls back again to a generic person icon. Supports online-presence status indicators, theme colors, and size variants.

Fallback to Initials ​

When no image is provided (or the image fails to load), the avatar displays initials derived from the alt attribute, or explicitly from initials.

Full width

Colors ​

Use color to apply one of the semantic theme colors to the initials background.

Full width

Sizes ​

Full width

Rounded ​

Control the border-radius with rounded. Defaults to full (circular).

Full width

Status Indicator ​

Add a colored status dot with the status attribute. Status indicator dots are visual only: pair them with a contextual label in the surrounding UI when the status is meaningful to assistive technology users.

Full width

Avatar Group ​

Use ore-avatar-group to stack ore-avatar elements in an overlapping row with automatic overflow handling. When more avatars are provided than max allows, the excess count is shown in a +N badge.

Full width

API Reference ​

ore-avatar Attributes

AttributeTypeDefaultDescription
srcstringN/AImage source URL
altstringN/AAlt text; also used to derive initials automatically
initialsstringN/AExplicit initials (e.g. "JD") when no image loads
color'primary' | 'secondary' | 'info' | 'success' | 'warning' | 'error'N/ATheme color for initials background
size'sm' | 'md' | 'lg''md'Component size
rounded'sm' | 'md' | 'lg' | 'full''full'Border radius
status'online' | 'offline' | 'busy' | 'away'N/AOnline presence indicator dot

ore-avatar CSS Custom Properties

PropertyDescription
--avatar-sizeOverride the avatar width and height
--avatar-bgBackground color (initials background)
--avatar-colorText / icon foreground color
--avatar-radiusBorder radius
--avatar-borderBorder shorthand (e.g. 2px solid)
--avatar-border-colorBorder color (also used for status ring)
--avatar-font-sizeInitials font size
--avatar-font-weightInitials font weight

ore-avatar-group Attributes

AttributeTypeDefaultDescription
maxnumber5Maximum visible avatars. Excess avatars are hidden behind a +N badge
totalnumberN/AOverride the count shown in the overflow badge (defaults to hidden count)

ore-avatar-group Slots

SlotDescription
(default)ore-avatar elements to group

ore-avatar-group CSS Parts

PartDescription
overflowThe +N overflow count badge

ore-avatar-group CSS Custom Properties

PropertyDescription
--avatar-group-overlapNegative margin creating the overlap (default: -0.75rem)

Accessibility ​

The avatar component follows WAI-ARIA best practices. Provide a meaningful alt attribute on each ore-avatar: it serves as the accessible name and is also used to derive initials automatically. Initials backgrounds are decorative; the alt text provides the accessible name for screen readers.