Sidebar
Recursive navigation tree — collapsible groups, persistent open state, scroll restoration.
Installation
npx @cloudflare/nimbus-docs add sidebaryarn dlx @cloudflare/nimbus-docs add sidebarpnpm dlx @cloudflare/nimbus-docs add sidebarbunx @cloudflare/nimbus-docs add sidebarPreview
<Sidebar
items={[
{ type: "link", label: "Overview", href: "/", order: 0 },
{ type: "group", label: "Components", order: 1, children: [
{ type: "link", label: "Badge", href: "/components/badge", order: 0 },
{ type: "link", label: "Steps", href: "/components/steps", order: 1 },
]},
]}
persist
/>API reference
Every prop the component accepts, sourced from a single declaration.
| Prop | Type |
|---|---|
itemsrequired | SidebarItem[] |
persist | boolean |