Skip to contents
Interfaces DS
Landing Page

Sidebar

Keep workspace actions, grouped destinations and account controls within reach.

On this page

Usage

Personal workspace

Usage 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

  1. 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.

    For a global stylesheet in app/ or src/app/.

    JSON
    {
      "registries": {
        "@interfaces-ds": {
          "url": "https://docs.interfacesds.com/r/{name}.json",
          "headers": {
            "Authorization": "Bearer ${INTERFACES_DS_LICENSE_KEY}"
          }
        }
      }
    }
  2. Install the component.

    Terminal
    npx shadcn@latest add @interfaces-ds/sidebar

    To run the usage example, install these components together.

    Terminal
    npx shadcn@latest add @interfaces-ds/sidebar @interfaces-ds/dialog @interfaces-ds/dropdown-menu

API reference

Import these exports from @/components/ui/sidebar. The tables cover component-specific props and common controls.

SidebarIndex
PropTypeDefault
collapsiblebooleantrue
currentHrefstring—
defaultExpandedbooleantrue
groupsRequiredreadonly SidebarIndexGroup[]—
presentation"docs" | "app""docs"
renderLinkSidebarLinkRenderer—
Sidebar
PropTypeDefault
collapsible"none" | "icon" | "offcanvas""offcanvas"
side"right" | "left""left"
variant"sidebar" | "floating" | "inset""sidebar"
SidebarContent
SidebarFooter
SidebarGroup
SidebarGroupAction
PropTypeDefault
asChildbooleanfalse
disabledboolean—
namestring—
type"button" | "submit" | "reset"—
valuestring | number | readonly string[]—
SidebarGroupContent
SidebarGroupLabel
PropTypeDefault
asChildbooleanfalse
SidebarHeader
SidebarInput
PropTypeDefault
checkedboolean—
disabledboolean—
labelstring—
maxstring | number—
minstring | number—
multipleboolean—
namestring—
placeholderstring—
readOnlyboolean—
requiredboolean—
stepstring | number—
valuestring | number | readonly string[]—
SidebarInset
SidebarMenu
SidebarMenuAction
PropTypeDefault
asChildbooleanfalse
disabledboolean—
namestring—
showOnHoverbooleanfalse
type"button" | "submit" | "reset"—
valuestring | number | readonly string[]—
SidebarMenuBadge
SidebarMenuButton
PropTypeDefault
asChildbooleanfalse
disabledboolean—
isActivebooleanfalse
namestring—
sizenull | "default" | "sm" | "lg""default"
type"button" | "submit" | "reset"—
valuestring | number | readonly string[]—
variantnull | "default" | "outline""default"
SidebarMenuItem
PropTypeDefault
valuestring | number | readonly string[]—
SidebarMenuSkeleton
PropTypeDefault
showIconbooleanfalse
SidebarMenuSub
SidebarMenuSubButton
PropTypeDefault
asChildbooleanfalse
isActivebooleanfalse
size"sm" | "md""md"
typestring—
SidebarMenuSubItem
PropTypeDefault
valuestring | number | readonly string[]—
SidebarProvider
PropTypeDefault
defaultOpenbooleantrue
onOpenChange(open: boolean) => void—
openboolean—
SidebarRail
PropTypeDefault
disabledboolean—
namestring—
type"button" | "submit" | "reset"—
valuestring | number | readonly string[]—
SidebarSeparator
PropTypeDefault
orientation"horizontal" | "vertical"—
SidebarTrigger
PropTypeDefault
asChildboolean—
disabledboolean—
namestring—
type"button" | "submit" | "reset"—
valuestring | number | readonly string[]—