shadcn_ui-menubar
Shadcn UI 菜单栏组件(ShadMenubar)用于构建桌面风格的常驻顶部菜单,例如 File、Edit、View 等菜单项。每个顶层入口是一个 ShadMenubarItem,通过 child 提供显示标签,通过 items 提供下拉菜单条目列表。菜单条目使用 ShadContextMenuItem,可使用 ShadContextMenuItem.inset 创建内缩条目。分隔线可使用 ShadSeparator.horizontal 或 Divider(height: 8) 实现,也可封装为可复用的分隔线组件。通过嵌套 ShadContextMenuItem 并为其设置 items 可创建子菜单,父项通常配合 trailing: Icon(LucideIcons.chevronRight) 显示展开指示。将 enabled 设为 false 可禁用某个菜单项。适用于需要在 Flutter 应用中添加持久顶部菜单的场景。