microsoft/microsoft-ui-reactor/reactor-docking
Claude Code and agent skill by microsoft/microsoft-ui-reactor
- vendor
Checking that the SKILL.md file is still in the repository.
Reactor docking windows — `DockManager`, `DockSplit`/`DockTabGroup`/`Document`/`ToolWindow`, drag-to-float/redock, roles (`DocumentArea`/`ToolWindowStrip`), persistence. Use when building IDE-/Office-shaped layouts with dockable, tear-out tool windows and document wells. READ THIS BEFORE wiring `DockManager` — the content-vs-shape ownership model is the #1 thing people get wrong.
Install
npx vskill@latest install microsoft/microsoft-ui-reactor/reactor-dockingSKILL.md
The same SKILL.md was published earlier as microsoft/microsoft-ui-reactor/reactor-docking.
Docking in Reactor
DockManager hosts a tree of dockable panes that the user can drag, split, tear out into floating windows, re-dock, pin to a side, and persist. It is the foundation for IDE-/Office-shaped apps (solution explorer + editor well + tool panes).
The ownership model — READ THIS FIRST
This is the single most important rule, and the easiest to get wrong:
The app owns CONTENT. The host owns SHAPE.
- Content = which panes exist, their
Title/Content/Key, which document
is active. The app declares this via manager.Layout, fresh every render, derived from its own UseState.
- Shape = the user's drag-modified arrangement: split orientations/ratios,
which group a tab lives in, floating windows. The host owns this internally (spec 045 §2.30) and resolves the effective layout each render by matching your content to its shape by `Key`.
❌ The anti-pattern that breaks everything
Do NOT round-trip the host's live layout back into your own state:
This double-owns the shape. Symptoms (all of these at once):
- Drag-out-to-float works, but you can't drag back to re-dock.
- Clicking tabs doesn't switch / selection resets.
- Splitter drags snap back.
OnLiveLayoutChanged is for observation only (e.g. a layout inspector). It is never a setter for manager.Layout.
✅ The correct pattern
The app holds which documents are open (content), not the live tree. Opening or closing a pane changes the set of `Key`s in manager.Layout; the host detects the key-set change and merges it into its shape. Reset is a .WithKey(...) remount.
Rules of thumb:
- Derive
manager.Layoutfrom app state every render. Never store the host's tree. - Add/remove a pane ⇒ the
Keyset changes ⇒ the host picks it up. - Model-mutator additions (drag,
DockHostModel.Dock) keep the same app key set,
so the host preserves them. That's why round-tripping is both unnecessary and harmful.
- Reset / discard drag state ⇒
.WithKey($"dock-{epoch}")bump remounts the host. - Layout persistence across launches ⇒
PersistenceId, notOnLiveLayoutChanged.
Controlled prop note:SelectedIndex-style element properties areOptional<int>under the hood. Factory parameters such asSelectedIndex:still acceptint, but if you read an element record directly use.Valueor.GetValueOrDefault(-1). See
Building a layout
Document(closable, not pinnable) vsToolWindow(hideable, side-pinnable,
AllowedSides mask). Both reconcile through DockableContent.
- Roles (spec 046):
DocumentAreais the preferredDock(Center)target and
survives empty (the well stays a visible drop target). ToolWindowStrip is the preferred target for tool-window drops. Use object-initializer syntax for Document/ToolWindow so you opt into permission flags additively.
- Every pane needs a stable, equatable `Key` — it's how the host preserves
pane state across reorders, tear-out, and re-dock. No fallback to title-keying.
Pane content gotchas
Make pane bodies fill the pane
A docked pane body is content-sized by default — a plain Border/TextBox collapses to its desired height at the top of the pane. To fill, put it in a flex container with grow:
Multi-line TextBox: AcceptsReturn must be an element prop, not .Set
The TextBox descriptor applies AcceptsReturn/TextWrapping before Text on purpose — single-line mode truncates Text at the first newline. A .Set(tb => tb.AcceptsReturn = true) lambda runs after Text is assigned, so the body collapses to one line. Use the first-class modifiers:
Generally: any prop whose ordering relative to another prop matters belongs on the element (.AcceptsReturn(), .TextWrapping()), not in a .Set(...) escape hatch — .Set always runs last.
Key APIs
| API | Purpose | |
|---|---|---|
DockManager { Layout, PersistenceId, ... } | The host element | |
DockSplit(Orientation, children) | Resizable split (ratios owned by host) | |
DockTabGroup(docs, TabPosition, CompactTabs, SelectedIndex, Width/Height, Role) | A tab group | |
Document { Title, Key, Content, CanClose } | Closable document pane | |
ToolWindow { Title, Key, Content, CanPin, AllowedSides, ... } | Hideable/pinnable tool pane | |
.WithKey($"dock-{epoch}") | Remount to reset/discard drag shape | |
OnDocumentClosing | Sync app state when the host closes a tab | |
OnLiveLayoutChanged | Observe the resolved layout (never feed back to Layout) | |
DockingNativeInterop.Register(host.Reconciler) | One-time startup registration |
See samples/apps/reactor-ide for a complete IDE-shaped app exercising all of this.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files. Certified 27 Oct 2026.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingplugins/reactor/skills/reactor-docking/SKILL.md
Popularity
- Repository stars
- 660
- Repository forks
- 57
- 7-day trend score
- 37
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/microsoft/microsoft-ui-reactor/reactor-docking)