Dockview
    Preparing search index...

    Interface DockviewOptions

    interface DockviewOptions {
        announcements?: boolean;
        announcer?: (event: AnnouncementEvent) => void;
        className?: string;
        createGroupDragGhostComponent?: (
            group: DockviewGroupPanel,
        ) => IGroupDragGhostRenderer;
        createTabGroupChipComponent?: (
            tabGroup: ITabGroup,
        ) => ITabGroupChipRenderer;
        debug?: boolean;
        defaultHeaderPosition?: DockviewHeaderPosition;
        defaultRenderer?: DockviewPanelRenderer;
        disableAutoResizing?: boolean;
        disableDnd?: boolean;
        disableFloatingGroups?: boolean;
        disableTabsOverflowList?: boolean;
        dndEdges?: false | DroptargetOverlayModel;
        dndStrategy?: DockviewDndStrategy;
        dropOverlayModel?: (
            params: DropOverlayModelParams,
        ) => DroptargetOverlayModel | undefined;
        floatingGroupBounds?:
            | "boundedWithinViewport"
            | {
                minimumHeightWithinViewport?: number;
                minimumWidthWithinViewport?: number;
            };
        floatingGroupDragHandle?: "titlebar"
        | "tabbar";
        getAnnouncement?: (event: LiveRegionEvent) => string | null | undefined;
        getTabContextMenuItems?: (
            params: GetTabContextMenuItemsParams,
        ) => ContextMenuItem[];
        getTabGroupChipContextMenuItems?: (
            params: GetTabGroupChipContextMenuItemsParams,
        ) => (BuiltInChipContextMenuItem | ContextMenuItemConfig)[];
        hideBorders?: boolean;
        keyboardNavigation?: boolean | KeyboardNavigationOptions;
        locked?: boolean;
        messages?: Partial<DockviewMessages>;
        nonce?: CspNonceProvider;
        noPanelsOverlay?: "emptyGroup" | "watermark";
        popoutUrl?: string;
        scrollbars?: "native" | "custom";
        singleTabMode?: "default" | "fullwidth";
        tabGroupAccent?: "palette" | "off";
        tabGroupColors?: DockviewTabGroupColorEntry[];
        theme?: DockviewTheme;
        transformFloatingGroupDrag?: (
            context: FloatingGroupDragContext,
        ) => void | { left: number; top: number };
    }
    Index

    Properties

    announcements?: boolean

    Built-in screen-reader announcements of layout changes (a visually-hidden aria-live region narrating panel open/close etc.). On by default — set to false to disable, e.g. when the host app provides its own announcement system. Honoured live via updateOptions.

    announcer?: (event: AnnouncementEvent) => void

    Route 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.

    className?: string
    createGroupDragGhostComponent?: (
        group: DockviewGroupPanel,
    ) => IGroupDragGhostRenderer

    Factory 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.

    createTabGroupChipComponent?: (tabGroup: ITabGroup) => ITabGroupChipRenderer

    Factory to create custom tab group chip renderers. If not provided, the default chip renderer is used.

    debug?: boolean
    defaultHeaderPosition?: DockviewHeaderPosition
    defaultRenderer?: DockviewPanelRenderer
    disableAutoResizing?: boolean

    Disable the auto-resizing which is controlled through a ResizeObserver. Call .layout(width, height) to manually resize the container.

    disableDnd?: boolean
    disableFloatingGroups?: boolean
    disableTabsOverflowList?: boolean
    dndEdges?: false | DroptargetOverlayModel
    dndStrategy?: DockviewDndStrategy

    Selects 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.
    dropOverlayModel?: (
        params: DropOverlayModelParams,
    ) => DroptargetOverlayModel | undefined

    Shape 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.

    floatingGroupBounds?:
        | "boundedWithinViewport"
        | {
            minimumHeightWithinViewport?: number;
            minimumWidthWithinViewport?: number;
        }
    floatingGroupDragHandle?: "titlebar" | "tabbar"

    Selects 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.
    getAnnouncement?: (event: LiveRegionEvent) => string | null | undefined

    Localise 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.

    getTabContextMenuItems?: (
        params: GetTabContextMenuItemsParams,
    ) => ContextMenuItem[]

    Return 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.

    getTabGroupChipContextMenuItems?: (
        params: GetTabGroupChipContextMenuItemsParams,
    ) => (BuiltInChipContextMenuItem | ContextMenuItemConfig)[]

    Return 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.

    hideBorders?: boolean
    keyboardNavigation?: boolean | KeyboardNavigationOptions

    Operate 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:

    • Switch tab within the focused group — Ctrl+] / Ctrl+[.
    • Move focus between groupsF6 / Shift+F6 (sequential) or Ctrl+Shift+arrow keys (spatial: focus the group in that direction).
    • Dock the active panel without a mouse — 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.

    locked?: boolean
    messages?: Partial<DockviewMessages>

    Translate / 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.)

    noPanelsOverlay?: "emptyGroup" | "watermark"

    Define the behaviour of the dock when there are no panels to display. Defaults to watermark.

    popoutUrl?: string
    scrollbars?: "native" | "custom"

    Select 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.

    singleTabMode?: "default" | "fullwidth"
    tabGroupAccent?: "palette" | "off"

    Controls 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.
    tabGroupColors?: DockviewTabGroupColorEntry[]

    Replace 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.

    transformFloatingGroupDrag?: (
        context: FloatingGroupDragContext,
    ) => void | { left: number; top: number }

    Adjust 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.