徽标与状态
叠在头像上的小组件。
UnreadBadge
数字最多显示为 99+,避免过大的数字撑坏布局。完整计数仍会播报给辅助技术,所以真实数字重要时,用户不会只听到「九十九加」。
| 属性 | 类型 | 默认值 | 说明 |
|---|---|---|---|
count* | number | — | — |
className | string | — | — |
style | CSSProperties | — | — |
AvatarStatusDot
共八种色调。前四种表示在线状态:online、busy、away、offline;后四种表示智能体的工作状态:working、attention、error、info。两组共用头像的同一个角,因为同时显示两者时,第二个没有位置可放;名册只显示当前这一屏上更重要的那一种。
状态点外面有一圈页面背景色的描边,使它在头像上清晰可辨。ring 会在此基础上再加一圈向外扩散的光晕;需要引起注意的 working 和 attention 两种色调默认开启,其余默认关闭。如果状态没有同时用文字写出,请传入 label;没有 label 时,状态点是 aria-hidden,因为只靠颜色不能作为无障碍信号。
| 属性 | 类型 | 默认值 | 说明 |
|---|---|---|---|
className | string | — | — |
label | string | — | — |
pulse | boolean | false | Slow pulse, for states that mean "something is happening". |
ring | boolean | — | Expanding halo around the dot. Defaults to on for `working` and `attention`, which are the two tones that are asking to be noticed. |
style | CSSProperties | — | — |
tone | StatusTone | 'offline' | — |
WorkingBadge
三个脉动的圆点,用于忙碌中的智能体,大小正好放在状态点所在的那个角。不要在同一个头像上同时使用它和状态点,改用 working 色调即可。组件及其 props 见 WorkingBadge。
接下来
- WorkingBadge——忙碌智能体的三个点
- AgentPortrait——每个 id 一张固定的脸