id | string | 必填 | id="example" | 稳定导航标识 |
label | string | 必填 | label="Example" | 文字与折叠态可访问名称 |
icon | string | Snippet | — | icon={iconContent} | ResourceIcon 名称或自定义 leading 内容 |
iconCollection | string | — | iconCollection="Example" | icon 的 ResourceIcon collection;存在同名 SnowUI 图标时传入 "snowui" |
depth | 0 | 1 | 0 | depth={value} | 导航层级;1 表示二级 Item,由组件在 leading 槽绘制 L 形层级连接线并替换普通 Icon |
href | string | — | href="/components" | 存在时主操作渲染 Link,否则渲染 Button |
updated | boolean | false | updated | 内置 Badge dot;展开态位于外部 tags 之后,折叠态跟随 leading icon |
tags | Snippet | — | tags={tagsContent} | label 后、updated 前的自定义状态/分类标签;推荐使用 Badge variant="border" |
disabled | boolean | false | disabled | 禁用主操作 |
actions | SidebarActionData[] | Snippet | [] | actions={actionsContent} | 0~多个末尾操作;数组生成 Button bare |
onSelect | (id: string) => void | — | onSelect={(value) => { /* handle value */ }} | 本项选择回调 |
parts | ComponentPartsOf<{ Badge: typeof Badge; Button: typeof Button }> | — | parts={partsOptions} | 配置内置 Badge 与数据生成的 Button |