Dock manager

IDE-style dockable workspace built on splitters and tab stacks. Panes can be dragged between stacks, torn off into floating windows, and the arrangement is round-trippable as a JSON DockLayoutSnapshot.

Keyboard shortcuts
  • Tab / Shift + Tab — move focus through tab strips, splitter dividers, intersection handles, and floating-pane close buttons
  • On a tab strip: ← / → move between tabs, Home / End jump to the first / last one, Enter / Space activate the focused tab
  • On a splitter divider: ← / → (or ↑ / ↓ for a vertical split) resize by 10% — Shift makes it 1% — and Home / End drive it to its limits
  • On an intersection handle (the glyph where two splits cross): ← / → drive the vertical divider and ↑ / ↓ the horizontal one; Home / End drive the vertical one; Shift is again the 1% fine step
  • On a floating pane's edge or corner handle: arrows resize along that handle's axis (10px per step, Shift for 1px)
  • Floating-pane close button — Enter / Space closes the window
  • M on a focused tab — arm pane move mode. Only the bare key arms it; Ctrl/Alt/⌘ + M is left to the browser or the app.
  • Enter / Space / M on a tool window's title — arm move mode for that pane; its × closes the pane.
  • In move mode: T / R / B / L dock the pane to the top / right / bottom / left of the current stack · Shift with T / R / B / L docks it along that outer edge of the whole dock · F tears it off into a floating window · Esc cancels
  • In move mode, to reach a stack other than the current one: → / ↓ and ← / ↑ cycle forward and backward through every drop target — the four sides of each other docked stack, then “float” — announcing “side of pane names, option N of M” and outlining the target. Enter commits the highlighted target; it lands exactly where the equivalent mouse drop would.
  • Move mode stays armed while focus moves around inside the dock and cancels once focus leaves it; the commit always applies to the pane that was focused when M was pressed. Letters typed into an input, textarea, select or contenteditable inside a pane stay text and commit nothing.
  • While dragging a pane or a window, four edge guides appear at the dock's edges: dropping on one docks it along that whole edge.

Basic usage

Captured layout

{  "root": {    "kind": "split",    "direction": "horizontal",    "sizes": [      1,      2    ],    "children": [      {        "kind": "stack",        "panes": [          "panel-1",          "panel-2"        ],        "activePane": "panel-1"      },      {        "kind": "stack",        "panes": [          "panel-3"        ]      }    ]  },  "floating": []}

Source

<BsDockManager v-model:layout="layout" :panes="panes">  <template #pane="{ pane }">    <div v-if="pane === 'panel-1'" class="p-3">…</div>    <div v-else-if="pane === 'panel-2'" class="p-3">…</div>    <div v-else class="p-3">…</div>  </template></BsDockManager>

Tool windows and toolbars

A CAD-like shell. Toolbars live in trays along the edges (drag one by its dotted thumb, or out of every tray to float it); tool palettes get a caption and lay out in a column beside the drawing and in a row above or below it. The drawing cannot be moved or closed. The Windows buttons close a pane and reopen it where it stood.

Keyboard shortcuts
  • Enter / Space / M on a toolbar's thumb — arm toolbar move mode.
  • In toolbar move mode: T / B / L / R moves it to the top / bottom / left / right tray · ← / → along its row (↑ / ↓ in a side tray) · the other two arrows to the next row in or out · F floats it · Enter finishes · Esc puts it back.
  • Enter / Space / M on a palette's caption title — arm pane move mode, with the keys above.
  • Double-click a floating toolbar's caption to put it back in its tray.
<!-- panes: { draw: { title: 'Draw', kind: 'tool', size: 'auto' },            standard: { title: 'Standard', kind: 'toolbar' }, … } --><BsDockManager v-model:layout="layout" :panes="panes">  <!-- 'vertical' beside the drawing, 'horizontal' above or below it, or floating -->  <template #pane="{ pane, orientation }">    <MyPalette v-if="pane === 'draw'" :orientation="orientation" />  </template></BsDockManager>// A Windows menu: pure functions over the layout, in every framework.layout.value = isDockPaneOpen(layout.value, pane)  ? closeDockPane(layout.value, pane, panes)  : openDockPane(layout.value, pane, panes); // back where it stood