Skip to content
Razor catalogue

On this page

@addTagHelper *, Webority.Ui.Razor

A row of people

Nest avatars inside the group and they overlap into one identity row for a team or a project.

Overlapping avatars
Show code
<app-avatar-group>
    <app-avatar name="Jane Doe" tone="Auto"></app-avatar>
    <app-avatar name="Ravi Kumar" tone="Auto"></app-avatar>
    <app-avatar name="Mia Chen" tone="Auto"></app-avatar>
</app-avatar-group>

Capping with +N

Show the first few avatars and pass the hidden count as overflow, since the group does not slice the list.

Three shown, plus a count
+2
Show code
<app-avatar-group overflow="2">
    <app-avatar name="Jane Doe" tone="Auto"></app-avatar>
    <app-avatar name="Ravi Kumar" tone="Auto"></app-avatar>
    <app-avatar name="Mia Chen" tone="Auto"></app-avatar>
</app-avatar-group>

Sizing the row

Set one size on the group and every avatar and the +N chip follows it.

One size for the group
+2
+2
+2
Show code
<app-avatar-group size="AppAvatarSize.Sm" overflow="2">…</app-avatar-group>
<app-avatar-group size="AppAvatarSize.Md" overflow="2">…</app-avatar-group>
<app-avatar-group size="AppAvatarSize.Lg" overflow="2">…</app-avatar-group>
child size override: a group size is inherited, not forced
It sets --avatar-size on the row, which each avatar inherits, so an avatar with its own size still wins, letting you make one person larger if you need.
Show code
<app-avatar-group size="AppAvatarSize.Md">
    <app-avatar name="Jane Doe" tone="Auto"></app-avatar>
    <app-avatar name="Ravi Kumar" tone="Auto" size="AppAvatarSize.Xl"></app-avatar>
    <app-avatar name="Mia Chen" tone="Auto"></app-avatar>
</app-avatar-group>

Spacing

Tighten the overlap for dense tables, or loosen it when the faces matter more than the space.

Tight, normal, loose
Show code
<app-avatar-group spacing="Tight">…</app-avatar-group>
<app-avatar-group>…</app-avatar-group>
<app-avatar-group spacing="Loose">…</app-avatar-group>

Every option

Every value of every prop, one cell each.

size: presets, a custom pixel size and a CSS length

size="xs"
+1
size="sm"
+1
size="md"
+1
size="lg"
+1
size="xl"
+1
size="2xl"
+1
size="72"
+1
size="3rem"
+1
size="md" group, one app-avatar with its own size="xl"

spacing: tight, normal or loose

spacing="tight"
spacing="normal" (default)
spacing="loose"

overflow: the “+N” chip

(omitted): no chip
overflow="0": no chip
overflow="3"
+3
overflow="5": React passes a string count, parsed too
+5

moreLabel: the accessible name of the chip

more-label="{count} more" (default, React moreLabel): the accessible name of the +N chip, not its text
+2

className: extra classes on the group

class="…" (React className): adds extra classes to the group, no visible change here

children: the avatars to overlap

(content): one app-avatar
(content): five app-avatars

Guidance

What to do, and what to avoid.

Use it when

  • Several people belong to one row or card, such as assignees, reviewers or attendees.
  • You want a compact identity cluster instead of a long list of names.
  • A list is longer than you want to show and a +N summary will do.

Reach for something else when

  • You are showing a single person. → AppAvatar
  • You need a full, scannable list of people. → AppDataTable
  • The items are not people. → AppBadge

Reference

Try every prop, read the full list, and check keyboard and screen reader behaviour.

(none) xs sm md lg xl 2xl
(none) 48 72
tight normal loose
React, generated from the controls
<AppAvatarGroup>
  <AppAvatar name="Jane Doe" tone="auto" />
  <AppAvatar name="Ravi Kumar" tone="auto" />
  <AppAvatar name="Mia Chen" tone="auto" />
</AppAvatarGroup>
Razor, the same props
<app-avatar-group>
    <app-avatar name="Jane Doe" tone="Auto" />
    <app-avatar name="Ravi Kumar" tone="Auto" />
    <app-avatar name="Mia Chen" tone="Auto" />
</app-avatar-group>

7 props. The 4 most used come first.

Used on most screens 4 props

PropTypeDefaultDescription
sizedefault - xs | sm | md | lg | xl | 2xl - Sizes the whole row at once. Each avatar and the +N chip inherit it; an avatar with its own size still wins.
spacingdefault normal Tight | Normal | Loose normal How far the avatars overlap.
overflowdefault 0 int 0 The hidden count, shown as a +N chip after the avatars. Zero or unset shows no chip.
more-labeldefault {count} more string {count} more Replaces the built-in English text, for other languages. The {count} token is the hidden count.

Less common 3 props

PropTypeDefaultDescription
size-pxdefault - number - The size in pixels, instead of a preset.
classdefault - string - Extra classes on the group, merged with the component classes.
(content)default - markup - The app-avatar children to overlap.

Screen reader

2 notes
  • The group is a plain container with no role of its own; each avatar inside carries its own accessible name.
  • The +N chip is announced as an image named 'N more'.