DockPanel

A widget which provides a flexible docking area for widgets.
https://jupyterlab.github.io/lumino/widgets/classes/dockpanel.html

Example
//Python:
import dash
import dash_lumino_components as dlc

dock = dlc.DockPanel([
    dlc.Widget(
        "Example Content",
        id="initial-widget",
        title="Hallo",
        icon="fa fa-folder-open",
        closable=True)
], id="dock-panel")

Methods

loadLayout(newlayout)

Function to load the layout back in

recursively replace the widgets in the components dictionary

Parameters:
NameTypeDescription
newlayout

updateLayout()

Serialize the layout without widget instances

Type Definitions

propTypes

Properties
NameTypeDescription
idstring

ID of the widget

modestring

mode for the dock panel: ("single-document" | "multiple-document")

spacingnumber

The spacing between the items in the panel.

addToDomboolean

bool if the object has to be added to the dom directly

childrenArray.<Widget>

The widgets

widgetEventPropTypes.any

Widget events

layoutPropTypes.any

Layout similar to DockPanel.ILayoutConfig (https://phosphorjs.github.io/phosphor/api/widgets/interfaces/docklayout.ilayoutconfig.html)

Examples:

  • {"main": {"type": "tab-area", "widgets": ["initial-widget2", "initial-widget"], "currentIndex": 1}}
  • {"main": {"type": "split-area", "orientation": "horizontal", "children": [{"type": "tab-area", "widgets": ["initial-widget2"], "currentIndex": 0}, {"type": "tab-area", "widgets": ["initial-widget"], "currentIndex": 0}], "sizes": [0.5, 0.5]}}
  • {"main": {"type": "split-area", "orientation": "vertical", "children": [{"type": "tab-area", "widgets": ["initial-widget2"], "currentIndex": 0}, {"type": "tab-area", "widgets": ["initial-widget"], "currentIndex": 0}], "sizes": [0.5, 0.5]}}

Note! Use widget id in widget arrays!

setProps

Dash-assigned callback that should be called to report property changes to Dash, to make them available for callbacks.