Reference

AvatarGroup

Avatars overlapping in a row: past max: the rest are one +3.

AvatarGroup(max: Number, label: String) { … }

Since 6.2.0

max

label

Ada Lovelace
GH
AT
ED
KJ
MH
+2

Example

wf

AvatarGroup(max: 4, label: "Reviewers") { Avatar(src: "/icon-512.png", alt: "Ada Lovelace") Avatar(initials: "GH").primary Avatar(initials: "AT") Avatar(initials: "ED") Avatar(initials: "KJ") Avatar(initials: "MH") }

From a list, small

wf

state team = [{ id: "1", initials: "AL" }, { id: "2", initials: "GH" }, { id: "3", initials: "AT" }] AvatarGroup(max: 2, label: "Team") { for p in team by p.id { Avatar(initials: p.initials).sm } }

Related:

Badge Tag Chip Avatar

Props

Props of AvatarGroup
PropTypeUnsetMeaning

max:

Number

every avatar

How many avatars show; the rest are hidden and counted in one +N avatar (read "N more"). 0 shows them all

label:

String

none

Who they are: the accessible name of the group (role="group")

Attribute families: global, aria, data. Plus the 22 universal props every element takes: animate:, exit:, speed:, duration:, delay:, easing:, stagger:, on:, count:, shared:, class:, ref:, drag:, dragGroup:, dropValue:, dropAxis:, dropInside:, roving:, trapFocus:, mount:, update:, cleanup:.

Flags and cases

A flag is written after the parentheses with a dot: a Bool prop, or a case of one of the element's enum props. A case the enum lacks is an error with a hint.

No flags of its own.

Events

Every element also takes the props, the events and the attribute families listed on every element.

Slots

children

Renders with the class wf-avatar-group, stable across releases, so a stylesheet may target it.