Avatar — Playground

px
Nikita Repin
size
shape
status
State
html.html
<kui-avatar src="/users/nikita.png" name="Nikita Repin" />

Avatar group sample

kui-avatar-group takes a fixed KuiAvatarItem[] array rather than a playground control. This is a realistic sample list; it is independent of the controls above.

Nikita Repin, online +1
NameTypeDefaultDescription
srcstring | undefinedundefinedImage URL. Falls back to initials, then the icon fallback, on load error.
namestring | undefinedundefinedUsed to derive initials, the palette hash, and the accessible label.
initialsstring | undefinedautoExplicit one or two character initials, overriding the value derived from name.
altstring | undefinednameImage alt text and accessible label override.
size'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl''md'Fixed avatar size.
shape'circle' | 'square''circle'circle is intended for people; square is intended for entities such as bots, teams, or projects.
status'online' | 'away' | 'busy' | 'offline' | undefinedundefinedOptional presence indicator. Appended to the accessible label; the dot itself is decorative.
paletteIndexnumber | undefinedautoPalette slot from 1 to 7 used for the fallback background and text color. Clamped when explicit.
loadingbooleanfalseRenders the avatar using the internal [kuiSkeleton] loading treatment and hides avatar content.
kui-avatar-group avatarsreadonly KuiAvatarItem[][]Items rendered by the group. Each item accepts the same fields as kui-avatar.
kui-avatar-group maxnumber4Maximum visible avatars before the group collapses the rest into a +N overflow avatar.
kui-avatar-group sizeKuiAvatarSize'md'Size applied to every avatar in the group, including the overflow avatar.
kui-avatar-group shapeKuiAvatarShape'circle'Shape applied to every avatar in the group, including the overflow avatar.
kui-avatar-group labelstring'Avatar group'Accessible label for the group container.
.kui-avatar-actionCSS class-Applied to an external native button wrapping a kui-avatar to make it interactive. kui-avatar itself must not be made clickable.

Inputs verified against @kikita-labs/ui v1.6.1 public typings.