rc-dock
    Preparing search index...

    Interface LayoutProps

    DockLayout configuration, tab definitions and persistence callbacks.

    interface LayoutProps {
        defaultLayout?: LayoutBase;
        dockId?: string;
        dropMode?: "default" | "edge";
        groups?: { [key: string]: TabGroup };
        layout?: LayoutBase;
        maximizeTo?: string | HTMLElement;
        sideColumns?: SideColumns;
        style?: CSSProperties;
        tabs?: TabDefinitions;
        afterPanelLoaded(savedPanel: PanelBase, loadedPanel: PanelData): void;
        afterPanelSaved(savedPanel: PanelBase, panel: PanelData): void;
        loadTab(tab: TabBase): TabData;
        onLayoutChange(
            newLayout: LayoutBase,
            currentTabId?: string,
            direction?: DropDirection,
        ): void;
        saveTab(tab: TabData): TabBase;
    }
    Index

    Properties

    defaultLayout?: LayoutBase

    Initial uncontrolled layout. Tabs may be {id} references resolved by tabs or loadTab, or full inline TabData definitions.

    dockId?: string

    Shared drag scope. Layouts with the same id allow tabs and panels to move between them.

    dropMode?: "default" | "edge"

    Drop targeting: default shows direction buttons; edge uses pointer distance from panel edges. Edge mode does not dock floating panels by their headers. Defaults to default.

    groups?: { [key: string]: TabGroup }

    Tab style and behavior options keyed by group name.

    layout?: LayoutBase

    Controlled layout. Accept changes by supplying onLayoutChange and updating this prop.

    maximizeTo?: string | HTMLElement

    Render maximized panels in this DOM element or element id instead of the layout container.

    sideColumns?: SideColumns

    Collapse and accordion controls for the outer columns of a horizontal dock layout.

    style?: CSSProperties

    CSS styles for the layout container, including its position and size.

    Tab definitions keyed by id. The key supplies the tab's id. Replace this object to update titles and content independently of layout. Definitions are copied into the runtime layout; closing a tab does not remove its definition.

    Methods

    • Restore application data by mutating the loaded panel. Added tabs must be full definitions; loadTab is not called again.

      Parameters

      • savedPanel: PanelBase

        Serialized panel containing application data.

      • loadedPanel: PanelData

        Resolved panel to modify; set its group explicitly if it has no tabs.

      Returns void

    • Called after a user action or layout API change; loadLayout does not call it.

      Parameters

      • newLayout: LayoutBase

        Saved layout; assign to layout for controlled use.

      • OptionalcurrentTabId: string

        Tab involved in the change, when available.

      • Optionaldirection: DropDirection

        Docking command or change reason.

      Returns void