Layout
DockLayout
Multi-pane IDE workspace layout with collapsible left, right, and bottom dock panels.
import { DockLayout } from '@reactloom/ui';Examples
Workspace dock panels
Editor
Main workspace canvas
Terminal
Build succeeded in 198ms
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 & tokens</span> }}
bottom={{ title: 'Terminal', content: <span>Build succeeded in 198ms</span> }}
/>
);
}API reference
| Prop | Type | Default |
|---|---|---|
centerrequiredPrimary center workspace content. | ReactNode | — |
leftOptional collapsible left pane. | DockPane | — |
rightOptional collapsible right pane. | DockPane | — |
bottomOptional collapsible bottom pane. | DockPane | — |
labelAccessible region label. | string | 'Workspace' |
Keyboard interaction
| Key | Action |
|---|---|
| Enter / Space | Toggle 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.