Sidecar

Markdown

A drawer, sheet or inspector panel: docked beside content, floating over it, and a modal drawer or bottom sheet on small screens.

Use it for
An inspector or drawer beside content, becoming a sheet on small screens.
Not for
Blocking tasks. Try Modal.

Sidecar preview

Inspect a document while keeping its main content available.

Installation

npm install @stackunseen/ui
import { Sidecar } from '@stackunseen/ui/sidecar';
Styles: @stackunseen/ui/styles.css

Usage and props

Keep whether it’s open, and any drafts, in your app. Docked and floating panels turn into drawers on small screens, which can reset what’s inside, so keep drafts above it.

Supported inputs

This is the public signature used by this example. Open Code to see how the values and callbacks fit together.

open · onOpenChange · title · children · trigger? · presentation? · side? · mobileBreakpoint? · initialFocusRef? · returnFocusRef? · closeOnEscape? · inset?
How state and callbacks work
All props

Loading…

For your coding agent

Give the agent this page instead of a screenshot. The prompt wraps the page with the install and import lines and the rule that your server, not a click, completes an action.

Contract
open · onOpenChange · title · children · trigger? · presentation? · side? · mobileBreakpoint? · initialFocusRef? · returnFocusRef? · closeOnEscape? · inset?
Keeps honest
Keep whether it’s open, and any drafts, in your app. Docked and floating panels turn into drawers on small screens, which can reset what’s inside, so keep drafts above it.
MCP
read_component "Sidecar" on the docs endpoint
Open the Markdown file

Keyboard and customization

Keyboard

The trigger opens the inspector. Modal drawers contain focus and Escape returns it to the opener. An overlay inspector takes focus when it opens and closes on Escape from anywhere; docked panels allow working elsewhere.

Customization

Change shared colors, spacing, corners and icons with the theme. Use the component's supported props to adapt its content and layout. Customization guide and Theme Studio