Skip to content
← Inventory

Sidepanel

Root component for a sidepanel. Wraps Radix Dialog.Root.

Palette

Coastal Kitchen

12 materials · updated today

Usage

import { Sidepanel, sidepanelAnatomy, SidepanelBody, SidepanelClose, SidepanelCloseButton, SidepanelCloseButtonProps, SidepanelContent, SidepanelContentProps, SidepanelControls, SidepanelControlsProps, SidepanelDescription, SidepanelFooter, SidepanelHeader, SidepanelHeaderProps, SidepanelHeaderVariant, SidepanelNestedRoot, SidepanelNestedRootProps, SidepanelProps, SidepanelTitle, SidepanelTrigger, SidepanelWidth } from "@desk/ui/components/sidepanel";

Best practices

  • Reach for Sidepanel when you need nested sub-panels or a non-modal panel (modal={false}) that leaves the page interactive; a single focused edge panel is a Sheet.

  • Compose nested panels with SidepanelNestedRoot, and always render a SidepanelTitle for the accessible name.

Props

SidepanelCloseButton

PropTypeDefaultDescription
aria-labelstring

Accessible label. Defaults to "Close panel".

classNamestring

Additional CSS classes.

onClick() => void

Called when the button is pressed. Wire this to your close handler.

SidepanelContent

PropTypeDefaultDescription
titlestring

Accessible title for screen readers

openboolean

Whether the sidepanel is open (required for exit animations)

widthSidepanelWidth

Panel width: "default" (440px inset) or "full" (full viewport)

showOverlayboolean

Whether to show the backdrop overlay (default: true)

nestedOpenboolean

Whether a nested panel is currently open (triggers scale/shift effect)

SidepanelControls

PropTypeDefaultDescription
children(required)ReactNode
classNamestring

SidepanelDescription

PropTypeDefaultDescription
classNamestring

SidepanelHeader

PropTypeDefaultDescription
variantSidepanelHeaderVariant

SidepanelTitle

PropTypeDefaultDescription
classNamestring

Also exports

  • componentSidepanel
  • constsidepanelAnatomy
  • componentSidepanelBody
  • componentSidepanelClose
  • interfaceSidepanelCloseButtonProps
  • typeSidepanelContentProps
  • interfaceSidepanelControlsProps
  • componentSidepanelFooter
  • typeSidepanelHeaderProps
  • typeSidepanelHeaderVariant
  • componentSidepanelNestedRoot
  • typeSidepanelNestedRootProps
  • typeSidepanelProps
  • componentSidepanelTrigger
  • typeSidepanelWidth

Anatomy

Sidepanel

sidepanel

Root controlling open state for the slide-out panel

SidepanelTrigger

sidepanel-trigger

Element that opens the panel

SidepanelOverlay

sidepanel-overlay

Backdrop shown behind the panel in modal mode

SidepanelContent

sidepanel-content

The sliding panel surface

SidepanelHeader

sidepanel-header

Header area with title, description, and controls

SidepanelTitle

sidepanel-title

Panel heading

SidepanelDescription

sidepanel-description

Supporting summary beneath the title

SidepanelControls

sidepanel-controls

Left and right button clusters in the header

SidepanelBody

sidepanel-body

Scrollable main content region

SidepanelFooter

sidepanel-footer

Footer for primary actions

Composition

Builds on

Button, Stack