Dockview Documentation
repository·master·Indexed 23 days ago
https://github.com/mathuo/dockviewA zero-dependency docking engine for the web providing a layout manager with support for tabs, groups, grids, and split-views. Dockview offers a core JavaScript package and dedicated bindings for React (dockview-react), Vue 3 (dockview-vue), and Angular (dockview-angular), as well as an enterprise version (dockview-enterprise) with additional features.
What's inside Dockview
- Dockview is a zero-dependency docking layout manager designed for building IDE-like interfaces. It supports features such as tabs, groups, drag and drop, floating panels, and popout windows. It is compatible with React, Vue, Angular, and vanilla TypeScript.
Overview of Dockview features
masterDockview is a zero-dependency layout manager designed for building IDE-like interfaces in the browser. It supports the following core capabilities:
- Tabs & Groups: Organizes panels into groups with shared tab bars.
- Drag & Drop: Built-in support for rearranging panels and groups.
- Floating Panels: Allows detaching groups to position them freely over the layout.
- Popout Windows: Enables moving groups to separate browser windows.
- Serialization: Save and restore layouts using
api.toJSON()andapi.fromJSON(). - Zero Dependencies: The core library has no external runtime dependencies.
Use the Splitview component
masterThe
Splitviewcomponent is a primitive resizable split container that serves as the underlying building block for Dockview. It can be used independently to create layouts with resizable panels.Depending on your framework, you should refer to the specific props/options interfaces:
- React:
ISplitviewReactProps - Vue:
ISplitviewVueProps - Angular:
SplitviewAngularOptions - JavaScript:
SplitviewComponentOptions
- React:
Understand the Dockview Enterprise License
masterThe
dockview-enterprisepackage is proprietary, commercial software and is not open-source. It is governed by the Dockview Software Licence Agreement.Key distinctions:
- Enterprise Features: Require a paid licence to access or use.
- Open-Source Portions: Other parts of Dockview are available under an MIT licence and are unaffected by this commercial agreement.
- Licence Scope: The licence is granted per Licensed Developer and is not limited by the number of applications, projects, environments, or deployments in which the Enterprise Features are used.
Use the DockviewApi to manage layouts
masterThe
DockviewApiis the central interface for controlling a Dockview instance. It provides the methods necessary to:- Add panels and groups to the layout.
- Save and restore layouts (persistence).
- Subscribe to instance events.
Understand Dockview core primitives: Panels and Groups
masterDockview organizes content using two primary primitives:
- Panels: The basic unit of content. Panels are not created directly; instead, you register a component by name and instantiate it via
api.addPanel(). Each panel requires a uniqueidand the name of the registeredcomponent. - Groups: Containers that hold one or more panels. Groups render a tab bar at the top. When a group contains multiple panels, they appear as tabs. Groups are created automatically when panels are added and can be manipulated via the Group API.
- Panels: The basic unit of content. Panels are not created directly; instead, you register a component by name and instantiate it via
Built-in drag-and-drop behaviors in Dockview
masterDockview provides several native drag-and-drop capabilities for managing layout components:
- Tab Reordering: Position a tab between two existing tabs or at the end of a list of tabs.
- Group Merging: Merge one group into another group.
- Relative Positioning: Move both tabs and groups in relation to another group (using specific drop positions).
- Container Positioning: Move both tabs and groups in relation to the container edges (magnet drop positions).
Use the Gridview component for resizable grid layouts
masterThe
Gridviewcomponent provides a resizable grid layout that functions independently of the standard Dockview tabbed/drag-and-drop interface. It is implemented as a collection of nested_splitview_controls.Depending on your framework, you can use the following prop/option interfaces to configure the component:
- React: Use
IGridviewReactProps. - Vue: Use
IGridviewVueProps. - Angular: Use
GridviewAngularOptions. - JavaScript: Use
GridviewComponentOptions.
- React: Use
Use the Paneview component
masterThePaneviewcomponent is a split-view control consisting of a vertical stack of collapsible and resizable panes. Each panel includes a header and collapsible content area.Dockview 3.1.0 Release Notes
masterDockview version 3.1.0 introduced the ability to close tabs using the middle mouse button. It also included bug fixes for crashes during navigation with open popout groups and improved the timing of theonDidActivePanelChangesubscription by removing thequeueMicrotaskdeferral.Compare Dockview and Dockview Enterprise
masterDockview offers two editions:
- Dockview: A free, MIT-licensed, open-source version that provides the core features needed to build a complete docking layout.
- Dockview Enterprise: A commercial version with a 30-day free trial. It includes enterprise-ready features such as advanced overflow (search/previews), multi-row tabs, pinned tabs, tab/chip context menus, DnD compass, smart guides, auto-hide/auto-edge groups, and layout history.
Customize z-index in Dockview 1.17.2
masterDockview 1.17.2 introduced the ability to customize thez-indexvalues, allowing for better control over the stacking order of UI elements within the dockview layout.