Oros UI

Search documentation

Search Oros UI pages and components.

Sidebar

Builds a responsive application sidebar with collapsible navigation.

Workspace
Navigation
Workspace content

Installation

Install Sidebar from Oros with shadcn CLI 4.13.0.

pnpm dlx shadcn@4.13.0 add @oros/sidebar

Usage

import {
  Sidebar,
  SidebarContent,
  SidebarFooter,
  SidebarGroup,
  SidebarGroupAction,
  SidebarGroupContent,
} from "@/components/ui/sidebar"

Open the Source tab in the preview for a complete working example.

Anatomy

ExportResponsibility
SidebarThe root component that owns the primary structure and state.
SidebarContentContains the primary visible content.
SidebarFooterGroups supporting actions or metadata.
SidebarGroupGroups related items into one logical set.
SidebarGroupActionProvides an action associated with the component.
SidebarGroupContentContains the primary visible content.
SidebarGroupLabelProvides a visible label for its related control or value.
SidebarHeaderGroups heading and introductory content.
SidebarInputCaptures or exposes the current value.
SidebarInsetA composable part of the component anatomy.
SidebarMenuA composable part of the component anatomy.
SidebarMenuActionProvides an action associated with the component.
SidebarMenuBadgeA composable part of the component anatomy.
SidebarMenuButtonA composable part of the component anatomy.
SidebarMenuItemRepresents one option or repeated child.
SidebarMenuSkeletonA composable part of the component anatomy.
SidebarMenuSubA composable part of the component anatomy.
SidebarMenuSubButtonA composable part of the component anatomy.
SidebarMenuSubItemRepresents one option or repeated child.
SidebarProviderProvides shared state and behavior to descendant parts.
SidebarRailA composable part of the component anatomy.
SidebarSeparatorVisually and semantically separates related groups.
SidebarTriggerControls opening, selection, or disclosure behavior.
useSidebarReads or controls the component's shared state.

API Reference

Sidebar exports 24 named entries. Component exports accept the props of their underlying HTML element or Base UI component, plus an optional className, unless the source defines a more focused type.

  • Sidebar Component
  • SidebarContent Component
  • SidebarFooter Component
  • SidebarGroup Component
  • SidebarGroupAction Component
  • SidebarGroupContent Component
  • SidebarGroupLabel Component
  • SidebarHeader Component
  • SidebarInput Component
  • SidebarInset Component
  • SidebarMenu Component
  • SidebarMenuAction Component
  • SidebarMenuBadge Component
  • SidebarMenuButton Component
  • SidebarMenuItem Component
  • SidebarMenuSkeleton Component
  • SidebarMenuSub Component
  • SidebarMenuSubButton Component
  • SidebarMenuSubItem Component
  • SidebarProvider Component
  • SidebarRail Component
  • SidebarSeparator Component
  • SidebarTrigger Component
  • useSidebar Hook

Accessibility

  • Preserve the native and Base UI keyboard model when composing Sidebar; do not replace semantic links or controls with click-only elements.
  • Use concise accessible names, expose the current item when applicable, and verify focus order at both mobile and desktop widths.

Source

Sidebar uses the standard shadcn API and is distributed through Oros. Installing it adds the component source and required dependencies to your app. The Source tab above shows a complete usage example.