SxPersona (人物卡片)
- Implemented
展示个人信息的综合组件,包含头像、姓名、状态和次级信息。对齐 Microsoft Fluent UI Blazor Persona (v4.13.2) 的 API 结构,并说明 NextUI 当前实现状态。
使用场景
- 用户列表与联系人卡片
- 应用顶部或侧边身份信息
- 成员信息展示
约束说明
ImageSize需为数字字符串。Color仅覆盖主要文字颜色。
行为说明
Status映射到头像在线状态。- 支持头像图片或姓名首字母。
API
Parameters (参数)
| 状态 | 参数名 | 类型 | 默认值 | 描述 |
|---|---|---|---|---|
| Implemented | Name |
string? |
null |
姓名文案。 |
| Implemented | Image |
string? |
null |
头像图片地址。 |
| Implemented | ImageAlt |
string? |
null |
图片替代文本。 |
| Implemented | ImageSize |
string? |
null |
头像尺寸。 |
| Implemented | SecondaryText |
string? |
null |
次级文本。 |
| Implemented | TertiaryText |
string? |
null |
第三级文本。 |
| Implemented | Status |
PresenceStatus |
Unknown |
在线状态。 |
| Implemented | Color |
string? |
null |
文本颜色覆盖。 |
| Implemented | Id (继承) |
string? |
null |
组件 Id。 |
| Implemented | Class (继承) |
string? |
null |
CSS 类名。 |
| Implemented | Style (继承) |
string? |
null |
自定义样式。 |
| Implemented | Title (继承) |
string? |
null |
HTML title。 |
| Implemented | AdditionalAttributes (继承) |
IEnumerable<KeyValuePair<string, object>>? |
null |
额外属性。 |
示例
<SxPersona Name="John Doe" SecondaryText="Software Engineer" Status="PresenceStatus.Available" />