Tool windowsNew
Satellite palettes that dock and Chrome-like tabs that tear off, and the workspace model they share.
Nucleus ships two tool window archetypes, declared from nucleusApplication and included in
nucleus-application: satellite palettes that float beside a document or dock into it, and
Chrome-like tabs that tear off into windows of their own.
Every API in this section is @ExperimentalNucleusApi at level ERROR. Add
@OptIn(ExperimentalNucleusApi::class), or opt the module in with
optIn.add("dev.nucleusframework.window.ExperimentalNucleusApi") in kotlin.compilerOptions.
Pick an archetype


| Satellites | Tabs | |
|---|---|---|
| What the user sees | Tool palettes, inspectors, panes around a document | Documents as tabs in a strip at the top of each window |
| Who opens windows | You open the document windows; palettes follow the focused one | The workspace: one window per group of tabs |
| Moves | Float ↔ dock, dock ↔ dock, between document windows | Reorder, tear off, merge into another window |
| Declaration | Satellite(workspace, id, title) { … } | Tab(workspace, id, title) { … } |
| Page | Satellites, Docking | Tabs |
The two compose: a tab window can host its own DockLayout. See
Compose tabs with satellites.
Satellite, SatelliteWindow, Tab and TabWindows live in dev.nucleusframework.application,
the rest in dev.nucleusframework.window.tao.
Shared ideas
- The workspace owns placement. Declare each satellite or tab once, at application scope. The
workspace picks the host window and moves it on drag.
initialPlacement,initiallyOpenandgroupapply on the first declaration of anidonly. - Entries outlive composition. A satellite or tab declared again resumes where it was.
snapshot()andrestore()persist the layout. - State follows the content.
rememberSaveablesurvives every move between windows. Plainrememberdoes not: hoist it or make it saveable. - View models follow the content too.
viewModel { }inside a satellite or a tab belongs to it, not to the window showing it. Its view models survive moves, docking, undocking and hiding, and aSavedStateHandlekeeps its values across a move. They are cleared when a tab is closed, or when theSatelliteorTabdeclaration leaves the composition. See View models and lifecycle.
Two ways to carry a drag
SatelliteWorkspace.dragKind and TabWorkspace.dragKind hold the WorkspaceDragKind of the drag
in flight, or null.
| Value | When | What follows the pointer |
|---|---|---|
Window | Windows, macOS, X11, XWayland | A real window, or a ghost window |
Transfer | TaoWindow.canPlaceOnScreen == false (native Wayland) | The compositor's drag icon; dragGhost stays null |
Branch Wayland-sensitive chrome on TaoWindow.canPlaceOnScreen, or
SatelliteScope.isCompositorPlaced, never on the compositor name.
NUCLEUS_TAO_LINUX_RENDERER=x11 runs the app on XWayland and restores window-following drags.
A layout of your own carries its drags the same way with the transfer drag API. See
Carry a cross-window drag on Wayland.
Try them in the Nucleus Lab
Each archetype has a probe in the Nucleus Lab.
Open one with ./gradlew :examples:lab:app:run -Dlab.probe=<id>.
| Probe | What it shows |
|---|---|
workspace.satellites | Shared palettes, owner follows focus or a pin, drag to dock, layout snapshots |
workspace.tabs | Tear-off, merge, reorder, hover cards with thumbnails, the strip drawn with Jewel's TabStrip |
workspace.tab-satellites | One SatelliteWorkspace per tab window |
workspace.reader-dock | Right-to-left reader: layered sides, custom splitters and headers, fixed panes |
What's next
- Satellites: declare palettes and let them follow the focused document.
- Docking: lay docked panels out around your content.
- Tabs: turn documents into tabs that tear off into windows.
- Linux and Wayland: what a compositor-placed window changes.
Last updated on