Atelier UI

搜索组件…

搜索组件…

Icon Rail

仅图标的窄侧边栏,带提示、滑动指示器和可展开标签。

在沙盒中编辑

复制一段给 AI 编程工具的提示词,包含源码、依赖和用法

属性

IconRailProps

同时支持以下类型的全部属性: Omit<React.ComponentProps<"aside">, "children" | "onChange">

属性类型默认值说明
items* 必填IconRailItem[]—Primary destinations, listed from the top
bottomItemsIconRailItem[][]Pinned to the bottom, e.g. settings and the account avatar
headerReact.ReactNode—Brand mark shown at the top
activeIdstring——
defaultActiveIdstring——
onActiveChange(id: string) => void——
expandedboolean—Whether labels are shown (controlled)
defaultExpandedbooleanfalse—
onExpandedChange(expanded: boolean) => void——
expandedWidthnumber224Width in px when expanded

安装

$ npx shadcn@latest add https://chromotion.dev/r/icon-rail.json

同类组件