Sidebar Keep workspace actions, grouped destinations and account controls within reach.
On this pageUsage guidelines Use SidebarIndex with presentation='app' for a workspace and presentation='docs' for a reading index. Pass currentHref to mark the active link. Branches open to show the current destination.
Keep workspace actions in SidebarHeader, scroll destinations in SidebarContent and place account controls in SidebarFooter. Set collapsible={false} on SidebarIndex for persistent section headings. Nested branches keep their own disclosure.
Anatomy <SidebarProvider>
<Sidebar>
<SidebarHeader />
<SidebarContent>
<SidebarIndex presentation="app" groups={groups} currentHref={pathname} />
</SidebarContent>
<SidebarFooter />
</Sidebar>
<SidebarTrigger />
</SidebarProvider>Installation Set up your license key before connecting the private registry.
Connect this project to https://docs.interfacesds.com using the full URL shown below, including {name}. In components.json, add the registries field at the top level. If the field already exists, add only the @interfaces-ds entry inside it. Keep your existing aliases and other registries.
Next.js Vite
For a global stylesheet in app/ or src/app/.
JSON
Copy code Retry copy Copy code {
"registries" : {
"@interfaces-ds" : {
"url" : "https://docs.interfacesds.com/r/{name}.json" ,
"headers" : {
"Authorization" : "Bearer ${INTERFACES_DS_LICENSE_KEY}"
}
}
}
} Install the component.
Terminal
Copy command Retry copy Copy command npx shadcn@latest add @interfaces-ds/sidebarTo run the usage example, install these components together.
Terminal
Copy command Retry copy Copy command npx shadcn@latest add @interfaces-ds/sidebar @interfaces-ds/dialog @interfaces-ds/dropdown-menuAPI reference Import these exports from @/components/ui/sidebar. The tables cover component-specific props and common controls.
SidebarIndex Prop Type Default collapsiblebooleantruecurrentHrefstring—defaultExpandedbooleantruegroupsRequired readonly SidebarIndexGroup[]—presentation"docs" | "app""docs"renderLinkSidebarLinkRenderer—
Sidebar Prop Type Default collapsible"none" | "icon" | "offcanvas""offcanvas"side"right" | "left""left"variant"sidebar" | "floating" | "inset""sidebar"
SidebarContent
SidebarFooter
SidebarGroup
SidebarGroupAction Prop Type Default asChildbooleanfalsedisabledboolean—namestring—type"button" | "submit" | "reset"—valuestring | number | readonly string[]—
SidebarGroupContent
SidebarGroupLabel Prop Type Default asChildbooleanfalse
SidebarHeader
SidebarInput Prop Type Default checkedboolean—disabledboolean—labelstring—maxstring | number—minstring | number—multipleboolean—namestring—placeholderstring—readOnlyboolean—requiredboolean—stepstring | number—valuestring | number | readonly string[]—
SidebarInset
SidebarMenu
SidebarMenuAction Prop Type Default asChildbooleanfalsedisabledboolean—namestring—showOnHoverbooleanfalsetype"button" | "submit" | "reset"—valuestring | number | readonly string[]—
SidebarMenuBadge
SidebarMenuButton Prop Type Default asChildbooleanfalsedisabledboolean—isActivebooleanfalsenamestring—sizenull | "default" | "sm" | "lg""default"type"button" | "submit" | "reset"—valuestring | number | readonly string[]—variantnull | "default" | "outline""default"
SidebarMenuItem Prop Type Default valuestring | number | readonly string[]—
SidebarMenuSkeleton Prop Type Default showIconbooleanfalse
SidebarMenuSub
SidebarMenuSubButton Prop Type Default asChildbooleanfalseisActivebooleanfalsesize"sm" | "md""md"typestring—
SidebarMenuSubItem Prop Type Default valuestring | number | readonly string[]—
SidebarProvider Prop Type Default defaultOpenbooleantrueonOpenChange(open: boolean) => void—openboolean—
SidebarRail Prop Type Default disabledboolean—namestring—type"button" | "submit" | "reset"—valuestring | number | readonly string[]—
SidebarSeparator Prop Type Default orientation"horizontal" | "vertical"—
SidebarTrigger Prop Type Default asChildboolean—disabledboolean—namestring—type"button" | "submit" | "reset"—valuestring | number | readonly string[]—