SxList (列表)
基础列表展示组件。对齐 Microsoft Fluent UI Blazor List (v4.13.2) 设计与 API 结构,并说明 NextUI 当前实现状态。
使用场景
- 列表展示与导航
- 复杂项组合内容
- 信息摘要与操作入口
约束说明
SxList 仅作为容器使用。
SxListItem 支持文本或自定义内容。
行为说明
SxListItem 点击时触发 OnClick。
Disabled 为真时不响应点击。
API
Parameters (SxList)
| 状态 |
参数名 |
类型 |
默认值 |
描述 |
| Implemented |
ChildContent |
RenderFragment? |
null |
列表项集合。 |
| Implemented |
Disabled (继承) |
bool |
false |
禁用状态。 |
| 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 |
捕获不匹配的 HTML 属性。 |
Parameters (SxListItem)
| 状态 |
参数名 |
类型 |
默认值 |
描述 |
| Implemented |
Text |
string? |
null |
项标题文本。 |
| Implemented |
SecondaryText |
string? |
null |
副标题/描述文本。 |
| Implemented |
Icon |
string? |
null |
前置图标。 |
| Implemented |
IconStyle |
IconStyle |
Regular |
图标风格。 |
| Implemented |
ChildContent |
RenderFragment? |
null |
自定义内容。 |
| Implemented |
ActionContent |
RenderFragment? |
null |
右侧操作区域。 |
| Implemented |
OnClick |
EventCallback |
- |
点击事件。 |
| Implemented |
Disabled (继承) |
bool |
false |
禁用状态。 |
| 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 |
捕获不匹配的 HTML 属性。 |
示例
<SxList>
<SxListItem Text="项 1" Icon="star" />
<SxListItem Text="项 2" SecondaryText="描述信息" />
</SxList>