Examples

Workspace dock panels

Preview
Editor

Main workspace canvas

Terminal
Build succeeded in 198ms
Example.tsx
import { DockLayout } from '@reactloom/ui';

export default function BasicDockLayout() {
  return (
    <DockLayout
      left={{ title: 'Explorer', content: <span>src/App.tsx</span> }}
      center={<div><strong>Editor</strong><p style={{ margin: '6px 0 0' }}>Main workspace canvas</p></div>}
      right={{ title: 'Inspector', content: <span>Props &amp; tokens</span> }}
      bottom={{ title: 'Terminal', content: <span>Build succeeded in 198ms</span> }}
    />
  );
}

API reference

DockLayout props
PropTypeDefault
centerrequired
Primary center workspace content.
ReactNode—
left
Optional collapsible left pane.
DockPane—
right
Optional collapsible right pane.
DockPane—
bottom
Optional collapsible bottom pane.
DockPane—
label
Accessible region label.
string'Workspace'

Keyboard interaction

Keyboard interactions
KeyAction
Enter / SpaceToggle the focused dock panel visibility

Usage guidelines

Do

  • Use short, clear pane titles so toggle buttons remain scannable.

Don’t

  • Avoid nesting DockLayout inside another DockLayout.