OptionalannouncementsOptionalannouncerRoute announcements to your own screen-reader infrastructure instead of
the built-in aria-live regions (e.g. an app-wide live region). When
set, dockview hands you each AnnouncementEvent and writes nothing
to its own regions. getAnnouncement (localisation) still applies first.
OptionalclassOptionalcreateFactory to create the custom ghost element shown while dragging a group of panels (the small floating chip that follows the cursor).
If not provided, a default ghost rendering "Multiple Panels (N)"
is used. Supplying a factory replaces the entire default ghost,
enabling i18n / custom visuals.
OptionalcreateFactory to create custom tab group chip renderers. If not provided, the default chip renderer is used.
OptionaldebugOptionaldefaultOptionaldefaultOptionaldisableDisable the auto-resizing which is controlled through a ResizeObserver.
Call .layout(width, height) to manually resize the container.
OptionaldisableOptionaldisableOptionaldisableOptionaldndOptionaldndSelects which drag-and-drop implementation is active.
'auto' (default): HTML5 drag-and-drop drives mouse drags; pointer
events drive touch and pen drags. Matches the historical behaviour.'pointer': pointer events drive every input type. Useful in
environments where HTML5 drag-and-drop is unreliable (some Linux
browsers, certain Safari versions, embedded webviews). Cross-window
HTML5 drag and the HTML5 native drag image are not available in this
mode.'html5': HTML5 drag-and-drop only — disables touch / pen drag.OptionaldropShape the drop overlay shown over a group's drop targets — the tab
strip ('tab'), the header void space ('header_space') and the
panel content area ('content'). Return a DroptargetOverlayModel
to override that target's default overlay (size, activation threshold,
small-element boundaries), or undefined to keep the default.
group is provided where known (tab / header_space). The outer-layout
edge overlay is shaped by dndEdges, not this option, so 'edge' is
not dispatched here.
OptionalfloatingOptionalfloatingSelects which element moves a floating group when dragged.
'titlebar' (default): a dedicated, blank drag-handle bar is rendered
above the group's tab bar. Dragging it moves the floating window;
shift+drag (mouse) / long-press (touch) redocks into the grid. Style
it with the --dv-floating-titlebar-* theme variables.'tabbar': the legacy behaviour — the empty space in the tab bar
(the "void container") doubles as the move handle. No dedicated bar
is rendered.OptionalgetLocalise or override the built-in announcement strings (the default
messages are English). Return a string to use it, null / '' to
suppress that announcement, or undefined to keep the default. This is
how non-English apps translate announcements — core ships no message
catalog, only the default strings + this hook.
OptionalgetReturn the items to display in the tab context menu on right-click.
Use built-in string shortcuts ('close', 'closeOthers', 'closeAll', 'separator')
or provide a ContextMenuItemConfig object for custom items.
If omitted, no context menu is shown. Return an empty array to suppress the menu for specific cases.
OptionalgetReturn the items to display in the tab group chip context menu on right-click.
Use built-in string shortcuts ('separator', 'colorPicker', 'rename') or provide a
ContextMenuItemConfig object for custom items.
'colorPicker' renders a native grid of color swatches for the tab group.
'rename' renders an inline text input to rename the tab group.
If omitted, no context menu is shown on chip right-click. Return an empty array to suppress the menu for specific cases.
OptionalhideOptionalkeyboardOperate the dock with the keyboard. true enables the default bindings;
pass an object to override individual ones via keymap. Off by default
(opt-in while the feature matures). Enables:
Ctrl+] / Ctrl+[.F6 / Shift+F6 (sequential) or
Ctrl+Shift+arrow keys (spatial: focus the group in that direction).Ctrl+M arms a two-phase
move (arrows cycle the target group with a live drop preview +
screen-reader narration, Enter docks, Escape cancels).Defaults avoid Cmd-based and browser-reserved combinations (e.g.
Cmd+M is the macOS minimise-window shortcut); use keymap to
rebind for your platform.
OptionallockedOptionalmessagesTranslate / override the strings dockview speaks to assistive technology
— both the LiveRegion announcements and the keyboard-docking narration.
Provide any subset of DockviewMessages; unset entries keep the
English defaults. (getAnnouncement still applies first, per-event, for
announcements.)
OptionalnonceOptionalnoDefine the behaviour of the dock when there are no panels to display. Defaults to watermark.
OptionalpopoutOptionalscrollbarsSelect native to use built-in scrollbar behaviours and custom to use an internal implementation
that allows for improved scrollbar overlay UX.
This is only applied to the tab header section. Defaults to custom.
OptionalsingleOptionaltabControls how dockview applies tab group color accents.
'palette' (default): write --dv-tab-group-color, render the
color picker, and apply built-in accent styling.'off': opt out entirely. No --dv-tab-group-color is written,
the color picker is suppressed, and chips/indicators render
without the accent. The tg.color data field is preserved so
custom chip renderers can still read it and roll their own visual.OptionaltabReplace the built-in tab group color palette with a user-defined list.
Each entry has an id (stored on tabGroup.color and serialized),
a value (any CSS color expression — hex, rgb(), var(...), etc.),
and an optional label shown in the context menu picker.
If omitted, the default 9-color palette is used. The list fully replaces the defaults — there is no merge.
OptionalthemeOptionaltransformAdjust a floating group's position while it is being dragged. Runs on each pointer-move frame with the proposed top-left (before the container clamp) and returns an adjusted top-left, or nothing to leave it unchanged. Use it for snapping, alignment, or custom bounds. Move only — resizing a floating group is unaffected.
context.others holds the bounds of the other floating groups (relative
to the same container), snapshotted at drag start, so the callback can
align the dragged group against its siblings.
Built-in screen-reader announcements of layout changes (a visually-hidden
aria-liveregion narrating panel open/close etc.). On by default — set tofalseto disable, e.g. when the host app provides its own announcement system. Honoured live viaupdateOptions.