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
Sidepanelwhen you need nested sub-panels or a non-modal panel (modal={false}) that leaves the page interactive; a single focused edge panel is aSheet.Compose nested panels with
SidepanelNestedRoot, and always render aSidepanelTitlefor the accessible name.
Props
SidepanelCloseButton
| Prop | Type | Default | Description |
|---|---|---|---|
| aria-label | string | Accessible label. Defaults to "Close panel". | |
| className | string | Additional CSS classes. | |
| onClick | () => void | Called when the button is pressed. Wire this to your close handler. |
SidepanelContent
| Prop | Type | Default | Description |
|---|---|---|---|
| title | string | Accessible title for screen readers | |
| open | boolean | Whether the sidepanel is open (required for exit animations) | |
| width | SidepanelWidth | Panel width: "default" (440px inset) or "full" (full viewport) | |
| showOverlay | boolean | Whether to show the backdrop overlay (default: true) | |
| nestedOpen | boolean | Whether a nested panel is currently open (triggers scale/shift effect) |
SidepanelControls
| Prop | Type | Default | Description |
|---|---|---|---|
| children | ReactNode | ||
| className | string |
SidepanelDescription
| Prop | Type | Default | Description |
|---|---|---|---|
| className | string |
SidepanelHeader
| Prop | Type | Default | Description |
|---|---|---|---|
| variant | SidepanelHeaderVariant |
SidepanelTitle
| Prop | Type | Default | Description |
|---|---|---|---|
| className | string |
Also exports
- component
Sidepanel - const
sidepanelAnatomy - component
SidepanelBody - component
SidepanelClose - interface
SidepanelCloseButtonProps - type
SidepanelContentProps - interface
SidepanelControlsProps - component
SidepanelFooter - type
SidepanelHeaderProps - type
SidepanelHeaderVariant - component
SidepanelNestedRoot - type
SidepanelNestedRootProps - type
SidepanelProps - component
SidepanelTrigger - type
SidepanelWidth
Anatomy
Sidepanel
sidepanelRoot controlling open state for the slide-out panel
SidepanelTrigger
sidepanel-triggerElement that opens the panel
SidepanelOverlay
sidepanel-overlayBackdrop shown behind the panel in modal mode
SidepanelContent
sidepanel-contentThe sliding panel surface
SidepanelHeader
sidepanel-headerHeader area with title, description, and controls
SidepanelTitle
sidepanel-titlePanel heading
SidepanelDescription
sidepanel-descriptionSupporting summary beneath the title
SidepanelControls
sidepanel-controlsLeft and right button clusters in the header
SidepanelBody
sidepanel-bodyScrollable main content region
SidepanelFooter
sidepanel-footerFooter for primary actions