Avatar Group

Nachodzące na siebie awatary z „+N” dla pozostałych: osoby ze zdjęciami lub inicjałami albo awatary jako dzieci, ograniczone przez max, jako jedna nazwana grupa.

Dostępny w
  • Angular: dostępny
  • Vue: dostępny
  • React: dostępny
  • React Native: dostępny

Użycie

Import

ts
import {
  SoneAvatarGroupComponent,
} from "@surface-one/angular/avatar-group";

Dokumentacja API

SoneAvatarGroupComponentKomponent

`<sone-avatar-group>` — overlapping avatars with a "+N" one for the rest, as one labelled group (the web twin of the React Native `SoneAvatarGroup`). Give `people` (each an image with initials as its fallback, named by `name`), or project `sone-avatar` children; at most `max` show and the group's `size` applies to all. Name the group with `ariaLabel`; the overflow avatar is named by `overflowLabel` ("3 more").

Selektor
sone-avatar-group
Wejścia
NazwaTyp Domyślnie
people

People to draw as avatars (image, then initials); or project `sone-avatar` children.

readonly AvatarGroupPerson[] | nullnull
max

How many avatars show before the "+N" one.

number4
sizeAvatarSize"default"
ariaLabel

Names the group ("Project members").

string | nullnull
overflowLabel

The overflow avatar's accessible name.

(hidden: number) => string(n) => $localize`:The avatars an avatar group does not show:${n}:count: more`