Sidebar

Composable sidebar column structure for menus, grouped lists, and app-owned destinations.

Preview#

Chat
Opened proj-uiux
Preparing the next release candidate
Controls
Content
Live activity
import {
  LiveAgentActivityBar,
  SidebarBody,
  SidebarContent,
  SidebarControl,
  SidebarHeader,
  SidebarHeaderTitle,
  SidebarItem,
  SidebarList,
  SidebarLiveActivity,
  SidebarRoot,
  SidebarSection,
  SidebarSectionAttention,
  SidebarSectionChevron,
  SidebarSectionControls,
  SidebarSectionCount,
  SidebarSectionDisclosure,
  SidebarSectionEmpty,
  SidebarSectionHeader,
  SidebarSectionTitle,
  SidebarSectionTrailing,
} from "raft-ui";

<SidebarRoot>
  <SidebarHeader>
    <SidebarHeaderTitle />
    <SidebarControl />
  </SidebarHeader>
  <SidebarBody>
    <SidebarContent>
      <SidebarSection>
        <SidebarSectionHeader>
          <SidebarSectionDisclosure>
            <SidebarSectionTitle />
            <SidebarSectionCount />
            <SidebarSectionChevron />
          </SidebarSectionDisclosure>
          <SidebarSectionTrailing>
            <SidebarSectionAttention />
            <SidebarSectionControls>
              <SidebarControl />
            </SidebarSectionControls>
          </SidebarSectionTrailing>
        </SidebarSectionHeader>
        <SidebarList>
          <SidebarItem />
        </SidebarList>
        <SidebarSectionEmpty />
      </SidebarSection>
    </SidebarContent>
  </SidebarBody>
  <SidebarLiveActivity>
    <LiveAgentActivityBar />
  </SidebarLiveActivity>
</SidebarRoot>

API#WIP

SidebarItem and its row parts have a separate, complete API reference on the SidebarItem page. AppShellSidebarSlot is documented with the other shell regions on the AppShell page.

...props
react-resizable-panels group props
Groups the sidebar and adjacent resizable columns.
...props
react-resizable-panels panel props
Defines one resizable column in the group.
...props
react-resizable-panels separator props
Resize handle between adjacent panels.
...props
div props
Full-height sidebar frame that keeps the header and scroll body aligned.
...props
div props
Header layout slot for app-owned navigation and controls.
...props
div props
Truncated sidebar heading.
...props
div props
Owns the sidebar's scrollable body region.
...props
div props
Full-height scroll-content wrapper.
...props
div props
Optional desktop live-agent overlay. It pins the bar full-width to the sidebar bottom and owns the matching scroll-content clearance.
...props
button props
Top-level destination such as Saved.
...props
span props
Leading icon slot for a menu destination.
...props
span props
Menu destination label.
...props
span props
Trailing metadata slot for a menu destination.
...props
span props
Compact trailing count for a menu destination.
...props
section props
Groups a saved, pinned, channel, joint, or DM region.
...props
div props
Structural header wrapper for a sidebar section.
...props
button props
Collapsible section trigger.
...props
span props
Section heading label.
...props
span props
Section item count.
...props
span props
Disclosure indicator for a collapsible section.
...props
div props
Trailing area of a section header.
...props
span props
Unread or attention indicator in a section header.
...props
div props
Control group in a section header.
...props
button props
Single section-header control slot.
...props
div props
Compact empty-state wrapper for a section.
...props
div props
List wrapper for sidebar rows.
...props
div props
Static, non-interactive heading for sidebar groups that do not collapse.
...props
button props
Control button shared by the sidebar header and section control slots.