Avatar Group

重叠排列的头像,其余以“+N”表示:带图片或姓名首字母的人员,或子头像,数量由 max 限制,组成一个有名称的分组。

可用框架
  • Angular: 可用
  • Vue: 可用
  • React: 可用
  • React Native: 可用

用法

导入

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

API 参考

SoneAvatarGroupComponent组件

`<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").

选择器
sone-avatar-group
输入
名称类型 默认值
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`