Sidebar
A resizable sidebar for workspace navigation.
Sidebar Basic
Installation
pnpm add @notion-kit/uiAnatomy
<SidebarProvider>
<Sidebar>
<SidebarClose />
<SidebarHeader>{/* Your sidebar header */}</SidebarHeader>
<SidebarContent>{/* Your sidebar content */}</SidebarContent>
<SidebarFooter>{/* Your sidebar footer */}</SidebarFooter>
<SidebarRail />
</Sidebar>
<SidebarInset>{/* Your main content */}</SidebarInset>
</SidebarProvider>Examples
Notion sidebar
Sidebar Notion
The preview uses sample workspaces. To connect a sidebar to your auth server, use Workspace Switcher from @notion-kit/auth-ui.
pnpm add @notion-kit/ui @notion-kit/auth-uiAPI reference
SidebarProvider
Prop
Type
Note
Place the sidebar layout components inside <SidebarProvider>.
Sidebar
Sidebar accepts HTML <div> props and the props below.
Prop
Type
SidebarHeader
A SidebarHeader extends the HTML <div> element.
SidebarContent
A SidebarContent extends the HTML <div> element.
SidebarFooter
A SidebarFooter extends the HTML <div> element.
SidebarGroup
A SidebarGroup extends the HTML <div> element.
SidebarInset
A SidebarInset extends the HTML <main> element.
SidebarRail
Use SidebarRail inside Sidebar to toggle or resize it.
It accepts HTML <div> props and the props below.
Prop
Type
SidebarClose
SidebarClose is a button that closes the sidebar. The keyboard shortcut can also close it.
SidebarOpen
SidebarOpen is a button that opens the sidebar. The keyboard shortcut can also open it.
SidebarMenuItem
SidebarMenuItem accepts HTML <div> props and the props below.
Prop
Type
SidebarConfig
Prop
Type