Skip to content

react-dockable-desktop


react-dockable-desktop ​

Classes ​

PanelRegistry ​

Defined in: components/PanelRegistry.ts:86

Registry mapping catalog entries to allow programmatic panel instantiation inside dynamic layout cells or floating windows. Exported so createWorkspace() can create scoped, per-instance registries.

Constructors ​

Constructor ​
ts
new PanelRegistry(): PanelRegistry;
Returns ​

PanelRegistry

Methods ​

get() ​
ts
get(id): PanelRegistryEntry | undefined;

Defined in: components/PanelRegistry.ts:109

Retrieve a registered panel configuration by identifier.

Parameters ​
ParameterType
idstring
Returns ​

PanelRegistryEntry | undefined

getRegisteredIds() ​
ts
getRegisteredIds(): string[];

Defined in: components/PanelRegistry.ts:116

Returns a list of all registered panel entry identifiers.

Returns ​

string[]

register() ​
ts
register<P>(
   id, 
   Component, 
   defaultOptions?): void;

Defined in: components/PanelRegistry.ts:95

Register a new component to the panel catalog registry.

Type Parameters ​
Type Parameter
P extends object
Parameters ​
ParameterTypeDescription
idstringUnique string identifier.
ComponentComponentType<P>React component instance template.
defaultOptions?{ canClose?: boolean; canDock?: boolean; canDrag?: boolean; canFloat?: boolean; canMinimize?: boolean; canPopOut?: boolean; className?: string; defaultAnchor?: FloatAnchor; disableLivePreview?: boolean; favoritePosition?: { height: string | number; width: string | number; x: string | number; y: string | number; }; icon?: ReactNode; initialTarget?: "docked" | "floating" | "tabbed"; keepAlive?: boolean; preserveEmbeds?: boolean; renderHeaderActions?: (panelId) => ReactNode; tabClassName?: string; title?: | string | { defaultMessage?: string; id: string; values?: Record<string, string | number>; } | (() => string); }Custom default settings configuration.
defaultOptions.canClose?booleanEnables/disables closing actions for the tab/window.
defaultOptions.canDock?booleanfalse: the user can't dock this panel. Dragging it offers no group, tab or edge targets (corners still anchor a floating window), so it stays floating. The app's own docking calls always work; give the type initialTarget: 'floating' so it opens floating. Default true (7.9.0)
defaultOptions.canDrag?booleanEnables/disables window drag interactions.
defaultOptions.canFloat?booleanfalse: the user can't make this panel floating. A tab drag can't end in a floating window (dropped on nothing or on a corner, it stays where it was), and the "Float" and taskbar "Maximize" menu items are hidden. A window the app floated itself can still be moved. The app's own floatPanel always works. Default true (7.9.0)
defaultOptions.canMinimize?booleanEnables/disables minimizing of the panel instance.
defaultOptions.canPopOut?booleantrue: a panel of this type can move into its own browser window (7.12.0), from its "Open in new window" menu item or workspace.popOutPanel(id). Needs a workspace created with popOut: true. It gates the menu item and new calls only: a window already open stays open when this changes. Default false
defaultOptions.className?stringClass added to each panel of this type, on its own content element (.rdd-panel-content), which moves with the panel between groups, windows and the taskbar preview. (7.8.0)
defaultOptions.defaultAnchor?FloatAnchorCorner of the workspace to anchor newly-opened floating windows to.
defaultOptions.disableLivePreview?booleanDisables live WebGL rendering canvas thumbnails inside the taskbar hover popup previews.
defaultOptions.favoritePosition?{ height: string | number; width: string | number; x: string | number; y: string | number; }Custom default bounds applied when the container is floated.
defaultOptions.favoritePosition.height?string | number-
defaultOptions.favoritePosition.width?string | number-
defaultOptions.favoritePosition.x?string | number-
defaultOptions.favoritePosition.y?string | number-
defaultOptions.icon?ReactNodeIcon placed next to title tags.
defaultOptions.initialTarget?"docked" | "floating" | "tabbed"Initial mounting state inside the desktop layout grid.
defaultOptions.keepAlive?booleanfalse unmounts the panel's component while it is hidden (an unselected tab, or minimized) and mounts it afresh when it is shown, to free what a heavy, rarely shown panel holds. Its own state is lost each time; its tab, title and lifecycle continue (onClose is not called), and the taskbar shows a placeholder instead of a live preview. While it is unmounted, a guard it registered with useBeforeClose is not active (its dirty flag still is), and saveLayout() saves its open-time props. Default true: panels stay mounted and keep their state, as they always have. (7.8.0)
defaultOptions.preserveEmbeds?booleanKeep embedded documents and media alive when the panel moves (7.11.0): an <iframe> doesn't reload when the panel is docked, floated, minimised or restored. The library then moves the panel's element with moveBefore(), which keeps that state, in browsers that have it (Chrome and Edge 133+, Firefox 144+); in the others (Safari) it moves as before and an iframe reloads. Off by default. Default false
defaultOptions.renderHeaderActions?(panelId) => ReactNodeCustom header actions renderer, placing custom components in the window/tab titlebar.
defaultOptions.tabClassName?stringClass added to the tab of each panel of this type. (7.8.0)
defaultOptions.title?| string | { defaultMessage?: string; id: string; values?: Record<string, string | number>; } | (() => string)Tab and window headers text — plain string or i18n descriptor.
Returns ​

void

Functions ​

computeResizedRect() ​

ts
function computeResizedRect(
   dir, 
   dx, 
   dy, 
   start, 
   constraints): ResizeRect;

Defined in: components/dragResize.ts:114

Pure function computing the new rect for an 8-directional resize handle drag.

maxW/maxH and minX/minY are independent, direction-scoped constraints rather than one "container bound" — a resize toward the fixed edge (e/s) is naturally bounded by a maximum dimension, while a resize toward the moving edge (w/n) is naturally bounded by a minimum position, and the two calling sites this was extracted from need different subsets of these (see workspace/floatingWindowDrag.ts's startResize, which omits all four and lets a window grow unbounded and be dragged fully off-screen, vs. panelOverlay/FloatingWidget.tsx's handleResizePointerDown, which supplies all four to keep windows within their container).

Parameters ​

ParameterType
dirResizeDir
dxnumber
dynumber
startResizeRect
constraintsResizeConstraints

Returns ​

ResizeRect


createWorkspace() ​

File ​

index.ts

Description ​

Public entry point for react-dockable-desktop 7.

Components carry an Rdd prefix, so they never collide with a UI kit's own Toolbar, Sidebar or ContextMenu. The full 6.x → 7.0 map is in the migration guide.

The library's modules still use their internal names; this file is the only place the 7.0 names are defined, and api-surface.json pins exactly what it exports.

Call Signature ​

ts
function createWorkspace<TPanels, TEvents>(config): TypedWorkspace<TPanels, TEvents>;

Defined in: api/index.tsx:77

Creates a workspace from a map marked by definePanels (7.10.0): openPanel takes only the registered names, with props checked against each panel's component. To name the events as well, pass both type arguments: createWorkspace<typeof panels, AppEvents>({ panels }).

Type Parameters ​
Type ParameterDefault type
TPanels extends Record<string, PanelDefinition>-
TEvents extends objectRecord<string, unknown>
Parameters ​
ParameterType
configWorkspaceConfig & { panels: PanelMap<TPanels>; }
Returns ​

TypedWorkspace<TPanels, TEvents>

Call Signature ​

ts
function createWorkspace<TEvents>(config?): Workspace<TEvents>;

Defined in: api/index.tsx:90

Creates a workspace. Pass it to <DockableDesktopProvider workspace={…}>.

Type Parameters ​
Type ParameterDefault type
TEvents extends objectRecord<string, unknown>
Parameters ​
ParameterType
config?WorkspaceConfig
Returns ​

Workspace<TEvents>

Example ​
ts
interface AppEvents { 'layer:select': { layerId: string } }
export const workspace = createWorkspace<AppEvents>({
  panels: { map: { component: MapPanel } },
  initialState: localStorage.getItem('layout'),
});

definePanels() ​

ts
function definePanels<TPanels>(panels): PanelMap<TPanels>;

Defined in: api/index.tsx:58

Marks a panel map for typing (7.10.0). Returns it unchanged; a workspace created from it gets a typed openPanel: only registered names, and props checked against that panel's component.

Type Parameters ​

Type Parameter
TPanels extends Record<string, PanelDefinition>

Parameters ​

ParameterType
panelsTPanels

Returns ​

PanelMap<TPanels>

Example ​

ts
const panels = definePanels({ map: { component: MapPanel }, chart: { component: ChartPanel } });
const workspace = createWorkspace({ panels });
workspace.openPanel('c1', 'chart', { props: { series: 3 } });   // checked against ChartPanel's props

formatLabel() ​

ts
function formatLabel(label, formatter): string;

Defined in: core/messages.ts:22

Helper to resolve dynamic label strings or localizable descriptor objects into text.

Parameters ​

ParameterType
label| string | MessageDescriptor | (() => string) | undefined
formatterMessageFormatter

Returns ​

string


isComputedRtl() ​

ts
function isComputedRtl(el): boolean;

Defined in: utils/rtl.ts:36

Whether el is laid out right-to-left, as the browser computes it — from a dir attribute on any ancestor, the CSS direction property, or the workspace's own setDirection.

Use this, not document.documentElement.dir, wherever a pointer delta (physical) is turned into a size, side or index (logical): RTL is often set on <body> or a wrapper rather than <html>, and the workspace can be RTL on an LTR page.

Parameters ​

ParameterType
elElement | null | undefined

Returns ​

boolean


isElementRtl() ​

ts
function isElementRtl(el): boolean;

Defined in: utils/rtl.ts:3

Parameters ​

ParameterType
elHTMLElement | null

Returns ​

boolean


isSerializable() ​

ts
function isSerializable(value): boolean;

Defined in: components/serializable.ts:21

Recursively checks whether a value can round-trip through JSON.stringify/JSON.parse without silently losing information.

Deliberately not a JSON.stringify try/catch — that call doesn't throw for the actual failure case this guards against: a function-valued property is simply dropped by JSON.stringify, not rejected. This walks the value tree instead, returning false as soon as it finds a function, symbol, undefined, React element, or any non-plain object (a class instance, Map, Set, RegExp, etc.).

Date is treated as an explicit exception — serializable-enough, matching JSON.stringify's own behavior — even though it doesn't round-trip back to a Date instance on parse. That's a smaller, more tolerable gotcha than a silently-vanishing function, so it's documented rather than treated as a disqualifying case.

Used to decide whether a docked/floating panel's props can be included in the workspace's saveLayout() output — see PanelInfo.serializable.

Parameters ​

ParameterType
valueunknown

Returns ​

boolean


RddFloatingWidget() ​

ts
function RddFloatingWidget(props): 
  | ReactElement<unknown, string | JSXElementConstructor<any>>
  | null;

Defined in: components/panelOverlay/FloatingWidget.tsx:108

A floating widget inside a panel — anchored within an RddPanelOverlay.

Docks to any corner, drags free of it, and drops back onto one. Windows sharing a corner stack along the block axis with animated offsets. An axis can also span the panel instead of carrying a fixed size, so the window tracks the panel as it resizes — see RddFloatingWidgetProps.defaultStretch and Stretch.

Resize handles follow what is actually movable: a free-floating window is pinned by nothing and offers all eight, while a docked one offers only its free edges — plus both ends of any spanning axis, either of which releases it.

Parameters ​

ParameterType
propsRddFloatingWidgetProps

Returns ​

| ReactElement<unknown, string | JSXElementConstructor<any>> | null

Examples ​

ts
const [infoOpen, setInfoOpen] = useState(false);
<RddFloatingWidget
  id="layer-info" title="Layer Info"
  open={infoOpen} onClose={() => setInfoOpen(false)}
  defaultAnchor="top-right" defaultWidth={300} defaultHeight={200}
>
  <LayerInfoContent />
</RddFloatingWidget>
ts
// A full-width status strip along the bottom, tracking the panel's width.
// defaultHeight still applies; defaultWidth is what the inline axis returns to if released.
<RddFloatingWidget
  id="timeline" title="Timeline"
  open onClose={close}
  defaultAnchor="bottom-left" defaultStretch="width"
  defaultWidth={240} defaultHeight={120}
>
  <TimelineContent />
</RddFloatingWidget>

RddPanelOverlay() ​

ts
function RddPanelOverlay(__namedParameters): ReactElement;

Defined in: components/panelOverlay/PanelOverlayRoot.tsx:75

Context provider and layout root for the Panel Overlay system. Wrap your panel content with this to enable RddPanelToolbar, RddFloatingWidget, and useFloatingWidgets.

Parameters ​

ParameterType
__namedParametersRddPanelOverlayProps

Returns ​

ReactElement

Example ​

ts
function MyPanel() {
  return (
    <RddPanelOverlay style={{ position: 'relative', width: '100%', height: '100%' }}>
      <RddPanelToolbar position="top">...</RddPanelToolbar>
      <div className="my-panel-body">content</div>
    </RddPanelOverlay>
  );
}

RddPanelToolbar() ​

ts
function RddPanelToolbar(__namedParameters): ReactElement;

Defined in: components/panelOverlay/PanelToolbar.tsx:43

Toolbar strip that attaches to any edge of an RddPanelOverlay. Left/right toolbars inset automatically to avoid overlapping top/bottom toolbars. RTL layouts are detected and handled automatically.

Parameters ​

ParameterType
__namedParametersRddPanelToolbarProps

Returns ​

ReactElement

Example ​

ts
<RddPanelToolbar position="top" variant="frosted">
  <RddToolbarButton icon={<SaveIcon />} title="Save" onClick={save} />
  <RddToolbarToggle icon={<GridIcon />} title="Grid" active={grid} onToggle={() => setGrid(v => !v)} />
</RddPanelToolbar>

RddSidePanels() ​

ts
function RddSidePanels(__namedParameters): ReactElement;

Defined in: api/index.tsx:374

Renders the side drawers opened through useSidePanels.

Parameters ​

ParameterType
__namedParametersRddSidePanelsProps

Returns ​

ReactElement


RddToasts() ​

ts
function RddToasts(__namedParameters): 
  | ReactElement<unknown, string | JSXElementConstructor<any>>
  | null;

Defined in: components/Toast.tsx:474

Portal-rendered notification host. Mount once at your app root, outside the workspace container. All toast.* calls are routed here automatically via the internal event emitter.

Parameters ​

ParameterType
__namedParametersRddToastsProps

Returns ​

| ReactElement<unknown, string | JSXElementConstructor<any>> | null

Example ​

ts
<RddToasts position="top-right" progressBar />

RddToolbarButton() ​

ts
function RddToolbarButton(__namedParameters): ReactElement;

Defined in: components/panelOverlay/PanelToolbar.tsx:131

Icon button for use inside a PanelToolbar.

Parameters ​

ParameterType
__namedParametersRddToolbarButtonProps

Returns ​

ReactElement


RddToolbarCenter() ​

ts
function RddToolbarCenter(__namedParameters): ReactElement;

Defined in: components/panelOverlay/PanelToolbar.tsx:206

Centers its children within the toolbar using absolute positioning.

Parameters ​

ParameterType
__namedParameters{ children: ReactNode; }
__namedParameters.childrenReactNode

Returns ​

ReactElement


RddToolbarItem() ​

ts
function RddToolbarItem(__namedParameters): ReactElement;

Defined in: components/panelOverlay/PanelToolbar.tsx:199

Wrapper for a custom non-button control (e.g. a dropdown or input) inside a PanelToolbar.

Parameters ​

ParameterType
__namedParameters{ children: ReactNode; }
__namedParameters.childrenReactNode

Returns ​

ReactElement


RddToolbarSearch() ​

ts
function RddToolbarSearch(__namedParameters): ReactElement;

Defined in: components/panelOverlay/ToolbarSearch.tsx:51

Debounced async search field for use inside a PanelToolbar. Renders as a compact icon button that expands into a text input on activation. Results appear in a portal-rendered dropdown below the input.

Parameters ​

ParameterType
__namedParametersRddToolbarSearchProps

Returns ​

ReactElement

Example ​

ts
<ToolbarSearchInput
  placeholder="Find layer…"
  onSearch={(q, signal) => fetchLayers(q, { signal })}
  onSelect={result => workspace.focusLayer(result.id)}
/>

RddToolbarSeparator() ​

ts
function RddToolbarSeparator(): ReactElement;

Defined in: components/panelOverlay/PanelToolbar.tsx:185

Vertical (or horizontal) divider line between groups of toolbar items.

Returns ​

ReactElement


RddToolbarSpacer() ​

ts
function RddToolbarSpacer(): ReactElement;

Defined in: components/panelOverlay/PanelToolbar.tsx:192

Flex-grow spacer that pushes subsequent toolbar items to the far edge.

Returns ​

ReactElement


RddToolbarToggle() ​

ts
function RddToolbarToggle(__namedParameters): ReactElement;

Defined in: components/panelOverlay/PanelToolbar.tsx:165

Two-state icon toggle button for use inside a PanelToolbar. Sets aria-pressed automatically.

Parameters ​

ParameterType
__namedParametersRddToolbarToggleProps

Returns ​

ReactElement


sectionToTab() ​

ts
function sectionToTab(section, fallbackIcon?): SidebarTab;

Defined in: components/PanelContributionContext.tsx:158

Converts a contributed sidebar section into a SidebarTab for <RddSidebar tabs={...}>. SidebarTab.icon is optional but recommended unless the tab is hidden; supply fallbackIcon for sections that omit one. eagerMount/preserveState have no contribution-side equivalent — a contribution only exists while its owning panel is mounted and active, so both are left unset.

Parameters ​

ParameterTypeDefault value
sectionPanelSidebarSectionundefined
fallbackIconReactNodenull

Returns ​

SidebarTab


startPointerDrag() ​

ts
function startPointerDrag<TStart>(config): void;

Defined in: components/dragResize.ts:42

Starts a pointer-capture-based drag: captures the pointer on element, tracks movement via listeners scoped to that element's own lifetime (not window), and cleans up automatically on release or cancel, and (7.9.0) when the window loses focus or the capture is lost, so a drag can never outlive its element or leave its classes behind.

Type Parameters ​

Type Parameter
TStart

Parameters ​

ParameterType
configPointerDragConfig<TStart>

Returns ​

void


useActiveContribution() ​

ts
function useActiveContribution(): PanelContribution | null;

Defined in: components/PanelContributionContext.tsx:131

Returns whatever the currently active panel (state.activePanelId) has published via usePanelContribution(), or null if no panel is active or the active panel hasn't contributed anything. When the active panel shows a managed widget moved out of its owner panel (7.11.0), this is the owner's contribution. Intended for the app shell to merge into its own <RddToolbar items={...}> / <RddSidebar tabs={...}> calls.

Returns ​

PanelContribution | null

Throws ​

Error if used outside of a DockableDesktopProvider.


useBeforeClose() ​

ts
function useBeforeClose(guard): void;

Defined in: api/index.tsx:235

Registers a close guard: resolve false to keep the panel open (ask the user, save first, …). Pass null to register none. Always calls the latest guard passed in.

Parameters ​

ParameterType
guard(() => boolean | Promise<boolean>) | null

Returns ​

void


useColorScheme() ​

ts
function useColorScheme(): ColorScheme;

Defined in: hooks/useColorScheme.ts:30

Reactively reads the page's data-color-scheme attribute on <html> — the one the host application sets to switch the library's scheme (the library itself never writes it) — returning 'dark' or 'light' and re-rendering whenever it changes.

Useful for panel content that needs to react to the same scheme the workspace itself is using — e.g. swapping a map's tile layer or an embedded editor's theme to match.

Returns 'dark' when rendered on the server.

Returns ​

ColorScheme


useContextMenu() ​

ts
function useContextMenu(): (options) => void;

Defined in: components/ContextMenu.tsx:708

Returns ​

(options) => void


useFloatingWidgets() ​

ts
function useFloatingWidgets(): FloatingWidgetsApi;

Defined in: components/panelOverlay/useFloatingWidgets.tsx:114

Imperative hook for spawning N named floating windows at runtime from data or event handlers. All widgets share z-ordering, drag, and corner-docking infrastructure of the RddPanelOverlay, and accept the same placement options — including ManagedWidget.stretch to span an axis of the panel.

Must be called inside a descendant of RddPanelOverlay, not in the component that renders it.

Returns ​

FloatingWidgetsApi

A stable FloatingWidgetsApi.

Example ​

ts
const manager = useFloatingWidgets();
manager.open('feature-42', { title: 'Feature 42', content: <FeatureDetail id={42} />, anchor: 'top-right' });

// A full-width strip along the bottom edge:
manager.open('timeline', { title: 'Timeline', content: <Timeline />, anchor: 'bottom-left', stretch: 'width', height: 120 });

useFormatMessage() ​

ts
function useFormatMessage(): MessageFormatter;

Defined in: components/WindowManagerContext.tsx:264

React hook to retrieve the active i18n formatter.

Returns ​

MessageFormatter


useHostClasses() ​

ts
function useHostClasses(): HostClasses;

Defined in: components/WindowManagerContext.tsx:41

Custom hook to read configured style class contexts.

Returns ​

HostClasses


useMergedSidebarTabs() ​

ts
function useMergedSidebarTabs(staticTabs, fallbackIcon?): SidebarTab[];

Defined in: components/PanelContributionContext.tsx:187

Convenience wrapper around useActiveContribution() for the common case: append the active panel's contributed sidebar sections (via sectionToTab) to a static tab list, as dynamic tabs that appear only while their panel is active. Returns staticTabs unchanged when there's nothing to add.

Parameters ​

ParameterTypeDefault value
staticTabsSidebarTab[]undefined
fallbackIconReactNodenull

Returns ​

SidebarTab[]


useMergedToolbarItems() ​

ts
function useMergedToolbarItems(staticItems): ToolbarItem[];

Defined in: components/PanelContributionContext.tsx:174

Convenience wrapper around useActiveContribution() for the common case: append the active panel's contributed toolbar items (behind a separator) to a static list. Returns staticItems unchanged when there's nothing to add. For manual control (a different merge position, no separator, etc.), call useActiveContribution() directly instead.

Parameters ​

ParameterType
staticItemsToolbarItem[]

Returns ​

ToolbarItem[]


useMessages() ​

ts
function useMessages(): Record<MessageKey, MessageDescriptor>;

Defined in: components/WindowManagerContext.tsx:281

React hook to fetch the localizable predefined message map catalog.

Returns ​

Record<MessageKey, MessageDescriptor>


useModals() ​

ts
function useModals(): ModalsApi;

Defined in: api/index.tsx:319

Opens and tracks modals.

Returns ​

ModalsApi


usePanel() ​

ts
function usePanel(): PanelHandle;

Defined in: api/index.tsx:163

The panel's own container: its id, where it is, and what it can do. Works in docked panels, floating windows, modals and side drawers.

The functions on the handle are stable; the handle object is not (see PanelHandle). To keep the tab title in step with a document:

tsx
const { setTitle, setDirty } = usePanel();
useEffect(() => { setTitle(doc.title); setDirty(doc.dirty); }, [setTitle, setDirty, doc.title, doc.dirty]);

Returns ​

PanelHandle


usePanelContextMenu() ​

ts
function usePanelContextMenu(items): void;

Defined in: components/WindowManagerContext.tsx:323

React hook for injecting custom context menu items into a panel's context menu from inside the panel component. Items are dynamic — the array is re-read each time the menu opens, so state-driven changes (enable/disable, add/remove) work automatically. The hook knows which panel it is in — no id needed.

Parameters ​

ParameterTypeDescription
itemsContextMenuItem[]Array of ContextMenuItem entries (simple items, separators, submenus).

Returns ​

void

Example ​

tsx
import { usePanelContextMenu } from 'dockable-windows';

function MyPanel() {
  const [dirty, setDirty] = useState(false);
  usePanelContextMenu([
    { label: 'Save', action: () => save() },
    { label: 'Revert', action: () => revert() },
  ]);
  return <Editor onChange={() => setDirty(true)} />;
}

usePanelContribution() ​

ts
function usePanelContribution(contribution): void;

Defined in: components/PanelContributionContext.tsx:104

Publish this panel's toolbar items and/or sidebar sections. Call on every render — republishes automatically whenever contribution changes, and is cleared when the panel unmounts. Memoize the object (and its array/callback contents, e.g. with useMemo/useCallback) to avoid republishing on every unrelated re-render.

Contributions are only ever surfaced while this panel is state.activePanelId — see useActiveContribution().

Parameters ​

ParameterType
contributionPanelContribution

Returns ​

void

Throws ​

Error if used outside of a DockableDesktopProvider.

Example ​

ts
function MapPanel() {
  const [controller, setController] = useState<'pan' | 'draw' | 'measure'>('pan');
  usePanelContribution({
    toolbarItems: (['pan', 'draw', 'measure'] as const).map(id => ({
      type: 'toggle', id, label: id, icon: icons[id],
      active: controller === id, onToggle: () => setController(id),
    })),
    sidebarSections: [{ id: 'layers', label: 'Layers', content: <LayerList /> }],
  });
  // ...
}

usePanelEvents() ​

ts
function usePanelEvents(events): void;

Defined in: api/index.tsx:213

Subscribes to the panel's lifecycle. Call it at the top level of the panel component; it always calls the latest callbacks passed in and cleans up on unmount — no dependency array.

Parameters ​

ParameterType
eventsPanelEvents

Returns ​

void


usePanelSize() ​

ts
function usePanelSize(): 
  | {
  height: number;
  width: number;
}
  | null;

Defined in: components/FormContainerContext.ts:130

Reactive alternative to measuring the panel's container yourself. Returns the panel's current { width, height }, or null before it has been laid out, and re-renders whenever the panel's rendered box changes — including resizes caused by the workspace itself (a grid split being dragged, docking, floating, or tab activation), not just resizes of an element the panel created.

Returns ​

| { height: number; width: number; } | null


usePanelWindow() ​

ts
function usePanelWindow(): PanelWindow;

Defined in: components/workspace/panelWindow.tsx:44

The window and document the panel is shown in (7.12.0): the pop-out's while the panel is in its own window, the main ones otherwise (and outside a workspace panel, or with popOut off). It changes when the panel pops out and when it returns, so code that listens on the window, uses its requestAnimationFrame, devicePixelRatio or matchMedia, or creates elements, can follow.

Returns ​

PanelWindow

Example ​

tsx
function Chart() {
  const { window: win } = usePanelWindow();
  useEffect(() => {
    const onResize = () => redraw(win.devicePixelRatio);
    win.addEventListener('resize', onResize);
    return () => win.removeEventListener('resize', onResize);
  }, [win]);
}

useSaveState() ​

ts
function useSaveState(getState): void;

Defined in: api/index.tsx:247

Reports the panel's restorable state, pulled fresh on every saveLayout() and saved as the panel's props. Pass null to report none. Always calls the latest function passed in.

Parameters ​

ParameterType
getState(() => unknown) | null

Returns ​

void


useSidebar() ​

ts
function useSidebar(): SidebarContext;

Defined in: components/Sidebar.tsx:818

Returns sidebar control functions from anywhere inside a <RddSidebar> tree, including floating panels rendered via {children}.

Returns ​

SidebarContext

Throws ​

Error if used outside of an RddSidebar.


useSidebarTab() ​

ts
function useSidebarTab(): SidebarTabContext;

Defined in: components/Sidebar.tsx:830

Returns tab-specific control functions for components rendered inside a sidebar tab's renderContent tree.

Returns ​

SidebarTabContext

Throws ​

Error if used outside of an RddSidebar tab's renderContent tree.


useSidePanels() ​

ts
function useSidePanels(): SidePanelsApi;

Defined in: api/index.tsx:344

Opens and tracks the left and right side drawers.

Returns ​

SidePanelsApi


useToolbar() ​

ts
function useToolbar(): ToolbarContextValue;

Defined in: components/ToolbarContext.tsx:45

Returns toolbar state and control functions from anywhere inside a <DockableDesktopProvider> tree.

Returns ​

ToolbarContextValue

Throws ​

Error if used outside of a DockableDesktopProvider.


useWidget() ​

ts
function useWidget(): WidgetHandle | null;

Defined in: components/panelOverlay/widgetContext.ts:57

The managed widget this component is rendered in, or null outside one (7.11.0).

Returns ​

WidgetHandle | null

Example ​

ts
function TableWidget() {
  const widget = useWidget();
  useEffect(() => widget?.onMoved(() => grid.current?.resize()), [widget]);
  return <Grid ref={grid} compact={widget?.location === 'panel'} />;
}

useWorkspace() ​

ts
function useWorkspace<TEvents>(): Workspace<TEvents>;

Defined in: api/index.tsx:100

The workspace of the nearest <DockableDesktopProvider>. A stable object: it never changes, so a component that only calls actions never re-renders because of it.

Type Parameters ​

Type ParameterDefault type
TEvents extends objectRecord<string, unknown>

Returns ​

Workspace<TEvents>


useWorkspaceState() ​

Call Signature ​

ts
function useWorkspaceState(): WorkspaceState;

Defined in: components/WindowManagerContext.tsx:199

The live workspace state. The component re-renders whenever it changes — or, given a selector, only when the selected value changes.

For reads without a subscription, call the workspace's isOpen() or getOpenPanelIds().

The selector must return a value that stays the same while the state does — a primitive, or a part of the state as it is (s => s.panels[id]). A selector that builds a new object or array on each call (s => ({ n: s.floating.length }), s => s.floating.map(...)) is a new value every time React asks, and React stops with "Maximum update depth exceeded". Select the parts separately, or derive the object with useMemo from what you selected.

Returns ​

WorkspaceState

The current workspace state, or the selector's result.

Throws ​

Error if used outside <DockableDesktopProvider>.

Example ​
tsx
function PanelCount() {
  const count = useWorkspaceState(s => Object.keys(s.panels).length);
  return <span>{count} open</span>;
}

Call Signature ​

ts
function useWorkspaceState<T>(selector): T;

Defined in: components/WindowManagerContext.tsx:200

The live workspace state. The component re-renders whenever it changes — or, given a selector, only when the selected value changes.

For reads without a subscription, call the workspace's isOpen() or getOpenPanelIds().

The selector must return a value that stays the same while the state does — a primitive, or a part of the state as it is (s => s.panels[id]). A selector that builds a new object or array on each call (s => ({ n: s.floating.length }), s => s.floating.map(...)) is a new value every time React asks, and React stops with "Maximum update depth exceeded". Select the parts separately, or derive the object with useMemo from what you selected.

Type Parameters ​
Type Parameter
T
Parameters ​
ParameterType
selector(state) => T
Returns ​

T

The current workspace state, or the selector's result.

Throws ​

Error if used outside <DockableDesktopProvider>.

Example ​
tsx
function PanelCount() {
  const count = useWorkspaceState(s => Object.keys(s.panels).length);
  return <span>{count} open</span>;
}

Interfaces ​

AlertOptions ​

Defined in: api/index.tsx:294

Options of ModalsApi.alert. The title defaults to the alertTitle message.

Properties ​

PropertyTypeDescriptionDefined in
alertType?"info" | "warning" | "success" | "danger"-api/index.tsx:297
icon?ReactNode-api/index.tsx:298
message| string | { defaultMessage?: string; id: string; values?: any; }-api/index.tsx:295
okLabel?| string | { defaultMessage?: string; id: string; values?: any; }-api/index.tsx:299
size?"small" | "auto" | "medium" | "large" | "fullscreen"Defaults to 'small'.api/index.tsx:301
title?PanelTitle-api/index.tsx:296

BuiltInEvents ​

Defined in: WorkspaceClient.ts:20

Built-in lifecycle events always available on the workspace event bus.

Properties ​

PropertyTypeDescriptionDefined in
layout:changedRecord<string, never>Fires whenever something saveLayout() would capture changes — open/close/minimize/restore, float/dock/re-order/dock-to-edge, closing a group, maximizing a minimized panel, and an openPanel dedupeKey redirect. Coalesces those into one signal for autosave-style consumers, so they don't need to subscribe to separate events. Does not cover a registerStateProvider callback's return value changing on its own — that's a pull, there's no way to observe it changing without the panel separately notifying — nor split-ratio drags, floating-window moves and resizes, or toggling a floating window's maximized state.WorkspaceClient.ts:63
layout:panels-excluded{ panels: { component: string; id: string; }[]; }Fires from inside saveLayout() itself, only when that specific call excluded at least one panel (a panel whose current props — static or from a registerStateProvider — failed isSerializable). A passive PanelInfo.serializable flag alone isn't enough for this: nobody may be polling it at the exact moment a save happens and something silently drops out (e.g. a floating window rendering data from a live class instance). This is deliberately just a signal, not a UI opinion — decide for yourself whether that becomes a toast, a console warning, or nothing.WorkspaceClient.ts:73
layout:panels-excluded.panels{ component: string; id: string; }[]-WorkspaceClient.ts:73
panel:closed{ id: string; }-WorkspaceClient.ts:22
panel:closed.idstring-WorkspaceClient.ts:22
panel:minimized{ id: string; }-WorkspaceClient.ts:23
panel:minimized.idstring-WorkspaceClient.ts:23
panel:opened{ component: string; id: string; }-WorkspaceClient.ts:21
panel:opened.componentstring-WorkspaceClient.ts:21
panel:opened.idstring-WorkspaceClient.ts:21
panel:popped-out{ id: string; window: Window; }A panel moved into its own browser window (popOutPanel, 7.12.0), sent once it is laid out there (in the window's frame, and a frame later), so a resize() sees the window's size: window is it, the one usePanelWindow() now gives the panel. Sent for a managed widget's own panel too (useFloatingWidgets().popOut), with that panel's id.WorkspaceClient.ts:31
panel:popped-out.idstring-WorkspaceClient.ts:31
panel:popped-out.windowWindow-WorkspaceClient.ts:31
panel:popping-out{ id: string; }A panel is about to move into its own window (7.12.0): sent in the user's click, while its element is still in the page at its size. panel:popped-out follows, or panel:returned when the window fails before the panel got there. Not sent for a refused pop-out, nor for docking or floating.WorkspaceClient.ts:47
panel:popping-out.idstring-WorkspaceClient.ts:47
panel:restored{ id: string; }-WorkspaceClient.ts:24
panel:restored.idstring-WorkspaceClient.ts:24
panel:returned{ id: string; }A panel that was in its own window is back in the page (7.12.0), whatever brought it back: the app, the frame's button, the window closing, the provider unmounting. Not sent for a panel closed while out (panel:closed is). Sent once it is laid out in its place (a frame later); a panel back as a tab that isn't selected is 0 x 0 then. Also sent, without panel:popped-out, when the window fails before the panel got there. Sent for a managed widget's own panel too, as it goes back into its owner panel.WorkspaceClient.ts:40
panel:returned.idstring-WorkspaceClient.ts:40
panel:returning{ id: string; }A panel in its own window is about to come back (7.12.0): sent just before its element leaves that window, whatever brings it back, while it is still there at its size. panel:returned follows. Not sent for a panel closed while out.WorkspaceClient.ts:53
panel:returning.idstring-WorkspaceClient.ts:53

CloseOptions ​

Defined in: components/FormContainerContext.ts:8

Options used when requesting to close a container.

Properties ​

PropertyTypeDescriptionDefined in
force?booleanIf true, bypasses any dirty state warnings or custom close guards.components/FormContainerContext.ts:10

ConfirmOptions ​

Defined in: api/index.tsx:281

Options of ModalsApi.confirm. The title defaults to the modalTitle message.

Properties ​

PropertyTypeDescriptionDefined in
alert?string-api/index.tsx:284
alertType?"info" | "warning" | "success" | "danger"-api/index.tsx:285
icon?ReactNode-api/index.tsx:286
message| string | { defaultMessage?: string; id: string; values?: any; }-api/index.tsx:282
size?"small" | "auto" | "medium" | "large" | "fullscreen"Defaults to 'small'.api/index.tsx:290
title?PanelTitle-api/index.tsx:283
yesNo?booleanLabels the buttons Yes and No instead of OK and Cancel.api/index.tsx:288

ContextMenuAdapter ​

Defined in: components/ContextMenu.tsx:117

Properties ​

PropertyTypeDefined in
ComponentForwardRefExoticComponent<ContextMenuProps & RefAttributes<ContextMenuHandle>>components/ContextMenu.tsx:118

ContextMenuCheckbox ​

Defined in: components/ContextMenu.tsx:25

Properties ​

PropertyTypeDescriptionDefined in
active?booleanWhether the checkbox column renders at all (default: true).components/ContextMenu.tsx:27
enabled?booleanWhether the item is interactive (default: true). Prefer top-level disabled on the item instead.components/ContextMenu.tsx:29
valuebooleanCurrent checked state.components/ContextMenu.tsx:31

ContextMenuHandle ​

Defined in: components/ContextMenu.tsx:98

Methods ​

show() ​
ts
show(options): void;

Defined in: components/ContextMenu.tsx:99

Parameters ​
ParameterType
optionsShowContextMenuOptions
Returns ​

void


ContextMenuSeparator ​

Defined in: components/ContextMenu.tsx:44

Properties ​

PropertyTypeDefined in
separatortruecomponents/ContextMenu.tsx:45

ContextMenuSimpleItem ​

Defined in: components/ContextMenu.tsx:34

Properties ​

PropertyTypeDefined in
action?MenuItemActioncomponents/ContextMenu.tsx:39
checkbox?ContextMenuCheckboxcomponents/ContextMenu.tsx:38
cyAction?stringcomponents/ContextMenu.tsx:40
disabled?booleancomponents/ContextMenu.tsx:41
icon?ReactNodecomponents/ContextMenu.tsx:36
labelContextMenuLabelcomponents/ContextMenu.tsx:35
title?ContextMenuLabelcomponents/ContextMenu.tsx:37

ContextMenuSubMenu ​

Defined in: components/ContextMenu.tsx:48

Properties ​

PropertyTypeDefined in
items?ContextMenuItem[]components/ContextMenu.tsx:51
labelContextMenuLabelcomponents/ContextMenu.tsx:49
title?ContextMenuLabelcomponents/ContextMenu.tsx:50

DirtyStateOptions ​

Defined in: components/dirtyOptions.ts:11

Represents custom configuration options applied to the automatic unsaved changes modal.

Properties ​

PropertyTypeDescriptionDefined in
alert?stringOptional custom alert notification banner text. Typically lists missing validation field requirements or backup statuses.components/dirtyOptions.ts:28
alertType?"info" | "warning" | "success" | "danger"Color scheme severity level of the validation banner. Maps to theme highlight alerts. Default: 'info'components/dirtyOptions.ts:34
message?string | MessageDescriptorCustom warning explanation text or localizable message descriptor. Replaces the standard default message body templates.components/dirtyOptions.ts:22
title?string | MessageDescriptor | (() => string)Custom header title text or localizable message descriptor. Replaces the default "Unsaved Changes" title.components/dirtyOptions.ts:16

DockableDesktopProviderProps ​

Defined in: components/DockableDesktopProvider.tsx:15

Props for <DockableDesktopProvider>.

Properties ​

PropertyTypeDescriptionDefined in
childrenReactNode-components/DockableDesktopProvider.tsx:16
contextMenuAdapter?ContextMenuAdapterContext menu implementation. Defaults to the built-in menu.components/DockableDesktopProvider.tsx:46
dir?"rtl" | "ltr"Initial layout direction, when the workspace doesn't set one.components/DockableDesktopProvider.tsx:27
formatMessage?MessageFormatterTranslates every built-in label. Overridden by the workspace's own formatMessage.components/DockableDesktopProvider.tsx:23
messages?Record<string, MessageDescriptor>Overrides any subset of the built-in message table. Overridden by the workspace's own messages.components/DockableDesktopProvider.tsx:25
modalBodyClass?stringCSS class for the content area of every modal.components/DockableDesktopProvider.tsx:31
modalClass?stringCSS class for the outer wrapper of every modal.components/DockableDesktopProvider.tsx:29
popoutUrl?stringThe page a pop-out window opens (7.12.0): a same-origin page of the app, such as /popout.html, with an empty <body>. The library waits for it to load, then moves the panel in. Without it, the window opens blank. A page that can't be read (another origin, or a redirect off this one) or doesn't load within 10 s sends the panel back. Only used with createWorkspace({ popOut: true }). Set it when a third-party embed refuses a blank window: a YouTube player, for one, shows error 153 there.components/DockableDesktopProvider.tsx:55
popoutWrapper?ComponentType<PopoutWrapperProps>A component around every panel's content, given the window and document the panel is in (7.12.0): the main ones, then the pop-out's while it is in its own window. For CSS-in-JS: a cache per document, so the panel's styles are inserted where it is shown (a pop-out doesn't get rules inserted with insertRule from the page). Rendered for every panel, for its whole life, while the workspace has popOut: true (none otherwise), so nothing remounts when a panel moves. Pass a stable component (defined outside a render), not an inline function. In a pop-out it is also rendered around the window's frame (the icon and title you give the panel), a context menu and the toasts shown there, with that window: keep one cache per document, not per wrapper. Example import createCache from '@emotion/cache'; import { CacheProvider } from '@emotion/react'; const caches = new WeakMap<Document, ReturnType<typeof createCache>>(); const cacheFor = (doc: Document) => { let c = caches.get(doc); if (!c) { c = createCache({ key: 'pop', container: doc.head }); caches.set(doc, c); } return c; }; const PopoutWrapper = ({ document, children }: PopoutWrapperProps) => <CacheProvider value={cacheFor(document)}>{children}</CacheProvider>; <DockableDesktopProvider workspace={workspace} popoutWrapper={PopoutWrapper}>…</DockableDesktopProvider>components/DockableDesktopProvider.tsx:83
sidePanelBodyClass?stringCSS class for the content area of the side drawers.components/DockableDesktopProvider.tsx:35
sidePanelClass?stringCSS class for the outer wrapper of the side drawers.components/DockableDesktopProvider.tsx:33
windowBodyClass?stringCSS class for the content area of floating windows.components/DockableDesktopProvider.tsx:39
windowClass?stringCSS class for the outer wrapper of floating windows.components/DockableDesktopProvider.tsx:37
workspace?Workspace<object>The workspace to render, from createWorkspace(). Omit it and the provider creates an empty one of its own (register panels through useWorkspace().registry).components/DockableDesktopProvider.tsx:21
zIndexBase?numberStarting z-index for floating windows and all of the library's chrome overlays, which shift together via --rdd-z-base. Default 1000components/DockableDesktopProvider.tsx:44

DropTarget ​

Defined in: types.ts:39

The target leaf and position for a drag-and-drop dock operation.

Properties ​

PropertyTypeDefined in
leafIdstringtypes.ts:40
positionDropPositiontypes.ts:41

FloatingWidgetsApi ​

Defined in: components/panelOverlay/useFloatingWidgets.tsx:44

What useFloatingWidgets() returns.

Methods ​

close() ​
ts
close(id): void;

Defined in: components/panelOverlay/useFloatingWidgets.tsx:48

Close a named window by ID. No-op if the window is not open.

Parameters ​
ParameterType
idstring
Returns ​

void

closeAll() ​
ts
closeAll(): void;

Defined in: components/panelOverlay/useFloatingWidgets.tsx:50

Close all managed windows.

Returns ​

void

isOpen() ​
ts
isOpen(id): boolean;

Defined in: components/panelOverlay/useFloatingWidgets.tsx:52

Returns true if the named window is currently open.

Parameters ​
ParameterType
idstring
Returns ​

boolean

location() ​
ts
location(id): WidgetLocation | null;

Defined in: components/panelOverlay/useFloatingWidgets.tsx:71

Where a widget is shown (7.11.0), or null if it isn't open. Read when called; it doesn't re-render anything by itself.

Parameters ​
ParameterType
idstring
Returns ​

WidgetLocation | null

move() ​
ts
move(id, to): MoveResult;

Defined in: components/panelOverlay/useFloatingWidgets.tsx:66

Moves a widget out of its panel or back (7.11.0), without remounting its content: docked beside its owner panel, a tab in the owner's group, a floating window, or back into the panel where it last was. Out of the panel it is a workspace panel of its own, which the user can move, minimise and close like any other; closing it closes the widget. It never goes into a saved layout. Returns a result rather than throwing; a refusal changes nothing.

Parameters ​
ParameterType
idstring
toWidgetTarget
Returns ​

MoveResult

Example ​
ts
const widgets = useFloatingWidgets();
widgets.move('table', { to: 'docked', position: 'bottom', size: 0.35 });
widgets.move('table', { to: 'panel' });
open() ​
ts
open(id, config): void;

Defined in: components/panelOverlay/useFloatingWidgets.tsx:46

Spawn or reconfigure a named window. Safe to call with an already-open ID to update config.

Parameters ​
ParameterType
idstring
configManagedWidget
Returns ​

void

placement() ​
ts
placement(id): WidgetPlacement | null;

Defined in: components/panelOverlay/useFloatingWidgets.tsx:80

Where a widget is, as plain JSON to save with the rest of your panel's state (7.11.0): in the panel (corner, stretch, free position, size) or out of it (docked, tabbed or floating, and where it goes back to). Give it back to open(id, { placement }) after a reload. null if it isn't open.

Parameters ​
ParameterType
idstring
Returns ​

WidgetPlacement | null

Example ​
ts
const saved = widgets.placement('table');                 // store it
widgets.open('table', { ...config, placement: saved ?? undefined });  // later: it opens where it was
popOut() ​
ts
popOut(id): PopOutResult;

Defined in: components/panelOverlay/useFloatingWidgets.tsx:96

Moves a widget into its own browser window (7.12.0), for a second monitor, without remounting its content. Synchronous: call it inside the user's click, in the page or in a pop-out window (its owner's, say: 7.12.1). From inside its panel it leaves the panel and goes into the window as one move; from docked, tabbed, floating or minimised, its panel moves. The same result and reasons as workspace.popOutPanel ('not-allowed' without ManagedWidget.canPopOut, or when its owner panel can't hold it out); a refusal changes nothing. While out, location() is 'floating' and useWidget().isPoppedOut is true.

Back: move() to any place returns it first, as one move; closing the window, or its "Back into the panel" button, puts it back into its panel where it was (D17). onWillMove / onMoved run around each, and the panel:popped-out / panel:returned events are sent for its panel.

Parameters ​
ParameterType
idstring
Returns ​

PopOutResult

Example ​
ts
<button onClick={() => widgets.popOut('table')}>Open in new window</button>

Properties ​

PropertyTypeDescriptionDefined in
openIdsstring[]IDs of all currently open managed windows, wherever they are shown. Changes to this array trigger re-renders.components/panelOverlay/useFloatingWidgets.tsx:54

FloatingWindow ​

Defined in: types.ts:134

Bounds and depth metadata for floated panel windows.

Properties ​

PropertyTypeDescriptionDefined in
anchor?FloatAnchor | nullCorner of the workspace this window is pinned to, or null when free-floating.types.ts:150
heightstring | numberCSS height value.types.ts:144
idstringUnique ID of the floating window.types.ts:136
maximized?booleanTrue if the window is currently maximized to full workspace bounds.types.ts:148
widthstring | numberCSS width value.types.ts:142
xstring | numberCSS left position offset (supports number/px or percentage strings).types.ts:138
ystring | numberCSS top position offset.types.ts:140
znumberRendering depth stack index layer.types.ts:146

HostClasses ​

Defined in: types.ts:675

Represents custom CSS classes injected into layout parts.

Properties ​

PropertyTypeDefined in
modalBodyClass?stringtypes.ts:677
modalClass?stringtypes.ts:676
sidePanelBodyClass?stringtypes.ts:679
sidePanelClass?stringtypes.ts:678
windowBodyClass?stringtypes.ts:681
windowClass?stringtypes.ts:680

LayoutGridNode ​

Defined in: types.ts:89

Grid layout branch node containing nested splits and relative flex sizes.

Properties ​

PropertyTypeDescriptionDefined in
childrenLayoutNode[]Children branches or leaf panels.types.ts:94
orientationSplitOrientationSplit orientation: horizontal places the children side by side, vertical stacks them.types.ts:92
sizesnumber[]Relative percentage sizes of each child layout block.types.ts:96
type"branch"-types.ts:90

LayoutLeafNode ​

Defined in: types.ts:102

Grid layout leaf node containing active tab groups and panel arrays.

Properties ​

PropertyTypeDescriptionDefined in
activePanelIdstring | nullThe currently active panel tab ID.types.ts:109
canClose?booleanIf false, close menu buttons are disabled for this group's tabs.types.ts:111
idstringUnique leaf identifier.types.ts:105
keepOnEmpty?booleanWhen true, the group persists in the layout even after its last panel is closed.types.ts:113
panelsstring[]Array of panel IDs mounted inside this group.types.ts:107
type"leaf"-types.ts:103

ManagedWidget ​

Defined in: components/panelOverlay/types.ts:47

Configuration for a widget spawned imperatively via useFloatingWidgets().open().

Properties ​

PropertyTypeDescriptionDefined in
anchor?FloatAnchorCorner of the panel to dock to on first render. Default 'top-right'components/panelOverlay/types.ts:61
canDock?booleanThe user may move it out of the panel into a docked panel or a tab (7.11.0): drags of its workspace panel, and what the app offers in ManagedWidget.titleMenu. Restricts the user only; move() always works. Changeable while open: call open() again. Default falsecomponents/panelOverlay/types.ts:77
canFloat?booleanThe user may move it out of the panel into a floating window (7.11.0). As ManagedWidget.canDock: the user only, changeable with another open(). Default falsecomponents/panelOverlay/types.ts:82
canPopOut?booleanIt may move into its own browser window (7.12.0): useFloatingWidgets().popOut(id), or an item the app offers in its ManagedWidget.titleMenu (w.popOut()). Needs a workspace created with popOut: true. Changeable while open: call open() again; a window already open stays open. Default falsecomponents/panelOverlay/types.ts:120
contentReactNodeWindow body content.components/panelOverlay/types.ts:59
height?numberInitial height in pixels.components/panelOverlay/types.ts:65
icon?ReactNodeOptional icon shown to the left of the title in the header.components/panelOverlay/types.ts:57
placement?WidgetPlacementOpen at a placement saved earlier with useFloatingWidgets().placement(id) (7.11.0): where it was in the panel, and whether it was docked, tabbed or floating out of it. Used only on the first open of an id, like anchor; a re-open of a live id leaves it where it is. A value this version can't read (another v, or broken fields) falls back to the config's own anchor / width / height / stretch. A valid one is clamped into the panel as it is now; in a panel that has no size yet (a background tab) a free position waits until it has one. If moving out of the panel is refused (the owner isn't docked), the widget stays in the panel.components/panelOverlay/types.ts:106
preserveEmbeds?booleanKeep embedded documents and media alive when the widget moves (7.11.0): an <iframe> in it doesn't reload when it moves out of its panel, back, or between docked, tabbed and floating. Uses moveBefore() where the browser has it (Chrome and Edge 133+, Firefox 144+); in the others an iframe reloads as before. As preserveEmbeds on a panel type's defaultOptions. Default falsecomponents/panelOverlay/types.ts:113
stretch?StretchWhich axes span the panel instead of carrying a fixed size. width/height above still apply to any axis that isn't spanning, and are what a spanning axis returns to when released. See Stretchcomponents/panelOverlay/types.ts:71
titlePanelTitleText shown in the window's header bar. Accepts a plain string or an i18n message descriptor. A descriptor is re-resolved on every render, so the header follows a language change without the window being closed and reopened — which a plain string cannot do here, because this config is stored by the overlay rather than re-read from your own render.components/panelOverlay/types.ts:55
titleMenu?(w) => ContextMenuItem[]The menu on the widget's title icon (7.11.0), in the app's own words: a "Dock below the map" or "Back into the map" item calls w.move(). With it, the title icon becomes a button that opens these items. Out of the panel, its tab's icon and its floating title-bar icon open them too: they lead the tab's menu (before the built-in Minimize and Close) and the floating window's ⋮ menu (before Close). The built-in Float is left out, because these replace it. Called each time the menu opens, so items can depend on where the widget is. Example titleMenu: w => w.location === 'panel' ? [{ label: 'Dock below the map', action: () => w.move({ to: 'docked', position: 'bottom' }) }] : [{ label: 'Back into the map', action: () => w.move({ to: 'panel' }) }]components/panelOverlay/types.ts:95
width?numberInitial width in pixels.components/panelOverlay/types.ts:63

MessageDescriptor ​

Defined in: types.ts:17

Structure representing localizable message descriptors used in context menus.

Properties ​

PropertyTypeDescriptionDefined in
defaultMessage?stringFallback label text if translation key is missing.types.ts:21
idstringTranslation dictionary key.types.ts:19
values?Record<string, string | number>Values injected into the translated text placeholder.types.ts:23

ModalOptions ​

Defined in: components/PanelProviderContext.tsx:49

Configuration options applied when opening a Modal.

Properties ​

PropertyTypeDescriptionDefined in
bodyPadding?string | numberCSS padding for the modal body content — a number (px) or any CSS value/shorthand (e.g. '10px 16px'). Default: 0 (edge-to-edge) — pass 10 to restore the pre-v6.0.0 default, or any value your content needs.components/PanelProviderContext.tsx:63
closable?booleanIf false, hides the modal backdrop exit click and header close button.components/PanelProviderContext.tsx:57
icon?ReactNodeIcon displayed in the modal title bar.components/PanelProviderContext.tsx:53
size?"small" | "auto" | "medium" | "large" | "fullscreen"Size modifier affecting CSS max-width rules.components/PanelProviderContext.tsx:55
title?PanelTitleDisplay title for the modal header.components/PanelProviderContext.tsx:51

ModalsApi ​

Defined in: api/index.tsx:260

Returned by useModals.

Properties ​

PropertyTypeDescriptionDefined in
alert(options) => Promise<void>Opens an RddAlert and resolves once it is acknowledged or dismissed.api/index.tsx:277
close(id) => void-api/index.tsx:266
closeAll() => void-api/index.tsx:267
confirm(options) => Promise<boolean>Opens an RddConfirm and resolves true when it is confirmed, false when it is cancelled or dismissed (Escape, the backdrop, the ×, or a close by code).api/index.tsx:275
get(id) => OverlayInstance | undefined-api/index.tsx:268
open<P>(component, props, options?) => string-api/index.tsx:265
setDirty(id, dirty, options?) => void-api/index.tsx:270
stackOverlayInstance[]Open modals, bottom to top.api/index.tsx:262
topmostOverlayInstance | nullThe top modal, or null.api/index.tsx:264
update(id, updates) => void-api/index.tsx:269

OpenPanelOptions ​

Defined in: types.ts:243

Options accepted by WorkspaceActions.openPanel.

Type Parameters ​

Type ParameterDefault type
P extends objectRecord<string, unknown>

Properties ​

PropertyTypeDescriptionDefined in
anchor?FloatAnchor | nullPin the new floating window to a workspace corner on creation. Has no effect when initialTarget is 'docked' or 'tabbed'.types.ts:250
dedupeKey?stringIf set, and another currently-open panel of the same component already has this exact dedupeKey, that existing panel is focused instead of opening a new one — the id/props passed to this call are ignored in that case, the same way re-opening an already-open exact id already focuses it instead of duplicating it. Use this when multiple call sites might not agree on the same literal id for what is semantically the same entity (e.g. "the panel for the document at this path"). See also WorkspaceActions.findPanelId.types.ts:269
dockTo?{ panel: string; position: DropPosition; size?: number; }Dock the new panel beside an open, docked panel: in that panel's group (position: 'center', as a tab) or in a new group split off on one side of it. size is the new group's share of that split, from 0.1 to 0.9 (the workspace's default split ratio when omitted). Wins over initialTarget. If panel is not docked (not open, floating or minimized), the new panel is placed as usual and a development warning says why. Applies only to a newly opened panel. (7.8.0) Example ws.openPanel('legend', 'legend', { dockTo: { panel: 'chart-1', position: 'right', size: 0.25 } });types.ts:282
dockTo.panelstring-types.ts:282
dockTo.positionDropPosition-types.ts:282
dockTo.size?number-types.ts:282
focus?booleanSet state.activePanelId to this panel. Default truetypes.ts:252
initialTarget?"docked" | "floating" | "tabbed"Initial placement: 'floating', 'docked' (default when a grid exists), or 'tabbed'.types.ts:247
props?PCustom per-instance data spread onto the panel component alongside panelId, matching openModal/openLeftPanel/openRightPanel's already-unconstrained props argument — no type restriction here either. Whether a specific value round-trips through saveLayout() is a runtime fact, not a type-level guarantee: see PanelInfo.serializable and the 'layout:panels-excluded' event.types.ts:260
title?string | MessageDescriptor | (() => string)Override the panel tab/window title. Accepts a plain string or an i18n message descriptor.types.ts:245

OverlayInstance ​

Defined in: components/PanelProviderContext.tsx:69

Represents a rendered instance of a panel or modal in the layout.

Properties ​

PropertyTypeDescriptionDefined in
ComponentComponentType<any>React Component to mount inside the panel.components/PanelProviderContext.tsx:74
containerType"modal" | "left-panel" | "right-panel"The target rendering layout zone.components/PanelProviderContext.tsx:79
dirty?booleanTrue if the form container has unsaved user edits.components/PanelProviderContext.tsx:83
dirtyOptions?DirtyStateOptionsCustom warning options applied to the automatic unsaved changes modal.components/PanelProviderContext.tsx:85
idstringUnique ID generated for this instance.components/PanelProviderContext.tsx:71
optionsSidePanelOptions | ModalOptionsConfiguration metadata settings.components/PanelProviderContext.tsx:81
propsRecord<string, any>Property props passed to the Component.components/PanelProviderContext.tsx:77

OverlayState ​

Defined in: components/PanelProviderContext.tsx:89

Stores the active layout structures for floating overlays.

Properties ​

PropertyTypeDescriptionDefined in
leftPanelOverlayInstance | nullThe currently open left drawer panel instance, or null.components/PanelProviderContext.tsx:91
modalsOverlayInstance[]Stack containing all active floating modal instances.components/PanelProviderContext.tsx:95
rightPanelOverlayInstance | nullThe currently open right drawer panel instance, or null.components/PanelProviderContext.tsx:93

PanelContribution ​

Defined in: components/PanelContributionContext.tsx:29

What a panel publishes via usePanelContribution(). Both fields are optional and independent — a panel may contribute only toolbar items, only sidebar sections, both, or neither. The app decides what "toolbar items" and "sidebar sections" mean for its own domain (map controls, document formatting, anything else).

Properties ​

PropertyTypeDefined in
sidebarSections?PanelSidebarSection[]components/PanelContributionContext.tsx:31
toolbarItems?ToolbarItem[]components/PanelContributionContext.tsx:30

PanelDefinition ​

Defined in: WorkspaceClient.ts:77

Per-panel definition supplied to createWorkspace({ panels }).

Properties ​

PropertyTypeDescriptionDefined in
componentComponentType<any>-WorkspaceClient.ts:79
defaultOptions?{ canClose?: boolean; canDock?: boolean; canDrag?: boolean; canFloat?: boolean; canMinimize?: boolean; canPopOut?: boolean; className?: string; defaultAnchor?: FloatAnchor; disableLivePreview?: boolean; favoritePosition?: { height: string | number; width: string | number; x: string | number; y: string | number; }; icon?: ReactNode; initialTarget?: "docked" | "floating" | "tabbed"; keepAlive?: boolean; preserveEmbeds?: boolean; renderHeaderActions?: (panelId) => ReactNode; tabClassName?: string; title?: | string | { defaultMessage?: string; id: string; values?: Record<string, string | number>; } | (() => string); }-WorkspaceClient.ts:80
defaultOptions.canClose?booleanEnables/disables closing actions for the tab/window.components/PanelRegistry.ts:39
defaultOptions.canDock?booleanfalse: the user can't dock this panel. Dragging it offers no group, tab or edge targets (corners still anchor a floating window), so it stays floating. The app's own docking calls always work; give the type initialTarget: 'floating' so it opens floating. Default true (7.9.0)components/PanelRegistry.ts:35
defaultOptions.canDrag?booleanEnables/disables window drag interactions.components/PanelRegistry.ts:22
defaultOptions.canFloat?booleanfalse: the user can't make this panel floating. A tab drag can't end in a floating window (dropped on nothing or on a corner, it stays where it was), and the "Float" and taskbar "Maximize" menu items are hidden. A window the app floated itself can still be moved. The app's own floatPanel always works. Default true (7.9.0)components/PanelRegistry.ts:29
defaultOptions.canMinimize?booleanEnables/disables minimizing of the panel instance.components/PanelRegistry.ts:37
defaultOptions.canPopOut?booleantrue: a panel of this type can move into its own browser window (7.12.0), from its "Open in new window" menu item or workspace.popOutPanel(id). Needs a workspace created with popOut: true. It gates the menu item and new calls only: a window already open stays open when this changes. Default falsecomponents/PanelRegistry.ts:77
defaultOptions.className?stringClass added to each panel of this type, on its own content element (.rdd-panel-content), which moves with the panel between groups, windows and the taskbar preview. (7.8.0)components/PanelRegistry.ts:50
defaultOptions.defaultAnchor?FloatAnchorCorner of the workspace to anchor newly-opened floating windows to.components/PanelRegistry.ts:41
defaultOptions.disableLivePreview?booleanDisables live WebGL rendering canvas thumbnails inside the taskbar hover popup previews.components/PanelRegistry.ts:43
defaultOptions.favoritePosition?{ height: string | number; width: string | number; x: string | number; y: string | number; }Custom default bounds applied when the container is floated.components/PanelRegistry.ts:20
defaultOptions.favoritePosition.heightstring | number-components/PanelRegistry.ts:20
defaultOptions.favoritePosition.widthstring | number-components/PanelRegistry.ts:20
defaultOptions.favoritePosition.xstring | number-components/PanelRegistry.ts:20
defaultOptions.favoritePosition.ystring | number-components/PanelRegistry.ts:20
defaultOptions.icon?ReactNodeIcon placed next to title tags.components/PanelRegistry.ts:16
defaultOptions.initialTarget?"docked" | "floating" | "tabbed"Initial mounting state inside the desktop layout grid.components/PanelRegistry.ts:18
defaultOptions.keepAlive?booleanfalse unmounts the panel's component while it is hidden (an unselected tab, or minimized) and mounts it afresh when it is shown, to free what a heavy, rarely shown panel holds. Its own state is lost each time; its tab, title and lifecycle continue (onClose is not called), and the taskbar shows a placeholder instead of a live preview. While it is unmounted, a guard it registered with useBeforeClose is not active (its dirty flag still is), and saveLayout() saves its open-time props. Default true: panels stay mounted and keep their state, as they always have. (7.8.0)components/PanelRegistry.ts:62
defaultOptions.preserveEmbeds?booleanKeep embedded documents and media alive when the panel moves (7.11.0): an <iframe> doesn't reload when the panel is docked, floated, minimised or restored. The library then moves the panel's element with moveBefore(), which keeps that state, in browsers that have it (Chrome and Edge 133+, Firefox 144+); in the others (Safari) it moves as before and an iframe reloads. Off by default. Default falsecomponents/PanelRegistry.ts:70
defaultOptions.renderHeaderActions?(panelId) => ReactNodeCustom header actions renderer, placing custom components in the window/tab titlebar.components/PanelRegistry.ts:45
defaultOptions.tabClassName?stringClass added to the tab of each panel of this type. (7.8.0)components/PanelRegistry.ts:52
defaultOptions.title?| string | { defaultMessage?: string; id: string; values?: Record<string, string | number>; } | (() => string)Tab and window headers text — plain string or i18n descriptor.components/PanelRegistry.ts:14

PanelDrop ​

Defined in: types.ts:80

The argument canDrop receives: which panel, of which registered kind, is going where. (7.9.0)

Properties ​

PropertyTypeDefined in
componentstringtypes.ts:82
panelIdstringtypes.ts:81
toPanelDropTargettypes.ts:83

PanelEvents ​

Defined in: api/index.tsx:199

Lifecycle callbacks for usePanelEvents. Each is called at the moment it describes.

Properties ​

PropertyTypeDefined in
onActivate?() => voidapi/index.tsx:200
onClose?() => voidapi/index.tsx:204
onContainerTypeChange?(type) => voidapi/index.tsx:206
onDeactivate?() => voidapi/index.tsx:201
onMinimize?() => voidapi/index.tsx:202
onResize?(width, height) => voidapi/index.tsx:205
onRestore?() => voidapi/index.tsx:203

PanelFloatPlacement ​

Defined in: components/panelOverlay/types.ts:37

Where a docked widget sits: which corner it is anchored to, plus which axes (if any) span the panel. Reported as a unit because a single gesture can change both at once — dropping a full-width bottom strip onto the left edge flips the anchor and the stretched axis together, and reporting those separately would expose a state that is never actually valid.

Properties ​

PropertyTypeDefined in
anchorFloatAnchorcomponents/panelOverlay/types.ts:38
stretchStretch | nullcomponents/panelOverlay/types.ts:39

PanelHandle ​

Defined in: api/index.tsx:119

What a panel component knows about, and can do to, its own container. See usePanel.

Identity. id and the five functions (close, minimize, setDirty, setTitle, setIcon) never change identity for the panel's lifetime. The handle object itself changes when containerType, isActive, isMinimized, isFloating or isPoppedOut does. So don't list the handle in a dependency array: depend on the function you call, or on the values you write.

Properties ​

PropertyTypeDescriptionDefined in
close(options?) => voidAsks the container to close, honouring close guards and the dirty flag.api/index.tsx:136
containerTypeContainerTypeWhere it is rendered. Updates live (a docked panel that is floated re-renders as 'floating-window').api/index.tsx:123
idstringThis panel's instance id.api/index.tsx:121
isActivebooleanA workspace panel that is the globally active one. Always false in a modal or drawer.api/index.tsx:125
isFloatingbooleanA workspace panel shown as a floating window. True too while it is in its own browser window.api/index.tsx:129
isMinimizedbooleanA workspace panel that is minimized to the taskbar.api/index.tsx:127
isPoppedOutbooleanA workspace panel shown in its own browser window (workspace.popOutPanel, 7.12.0). Its window and document are usePanelWindow's.api/index.tsx:134
minimize() => voidMinimizes a workspace panel. No effect in a modal or drawer.api/index.tsx:138
setDirty(dirty, options?) => voidMarks the panel as having unsaved changes.api/index.tsx:140
setIcon(icon) => voidChanges the icon on the panel's tab, floating title bar and taskbar button, or in a modal's or drawer's header. In a workspace panel, null goes back to the registration's defaultOptions.icon. The icon is not saved by saveLayout().api/index.tsx:148
setTitle(title) => voidChanges the title shown on the tab, window or modal.api/index.tsx:142

PanelInfo ​

Defined in: types.ts:156

Stores active runtime properties and status metadata for individual panel instances.

Properties ​

PropertyTypeDescriptionDefined in
componentstringString matching the component registration ID in the workspace's PanelRegistry.types.ts:162
dedupeKey?stringOptional dedup key. If another open panel of the same component already has this exact key, openPanel focuses that existing panel instead of creating a new one — see WorkspaceActions.openPanel's dedupeKey option and WorkspaceActions.findPanelId.types.ts:188
dirty?booleanTrue if the panel contains unsaved user edits.types.ts:172
dirtyOptions?DirtyStateOptionsCustom options applied to the automatic unsaved changes modal.types.ts:174
icon?ReactNodeIcon set at runtime with usePanel().setIcon() or WorkspaceActions.setPanelIcon, shown instead of the registration's defaultOptions.icon. Never saved by saveLayout(); loadLayout() keeps it for a panel that is still open.types.ts:192
idstringUnique panel identifier.types.ts:158
lastFloatingRect?{ anchor?: FloatAnchor | null; height: number; width: number; x: number; y: number; }Saved position boundaries used when returning the panel to a floating state.types.ts:168
lastFloatingRect.anchor?FloatAnchor | null-types.ts:168
lastFloatingRect.heightnumber-types.ts:168
lastFloatingRect.widthnumber-types.ts:168
lastFloatingRect.xnumber-types.ts:168
lastFloatingRect.ynumber-types.ts:168
lastLeafId?stringThe leaf group ID this panel was docked in prior to being floated.types.ts:170
owner?PanelOwnerSet on a panel that shows a managed widget moved out of its owner panel, whose component is the reserved 'rdd:widget'. Runtime only: such a panel is never written by saveLayout(), and the owner panel saves its widgets itself. (7.11.0)types.ts:198
poppedOut?trueSet while the panel is shown in its own browser window (workspace.popOutPanel). Such a panel is state: 'floating' and keeps its floating window entry, which the workspace does not draw. Runtime only: saveLayout() writes the panel where it would come back to (docked in its place, or floating at its rect), without it, and a loaded layout never has it. (7.12.0)types.ts:205
previousState?"docked" | "floating"Last state held before panel was minimized.types.ts:166
props?Record<string, unknown>Custom per-instance data passed via openPanel(id, component, { props }). Unconstrained — any value is accepted, but only a value that passes isSerializable is actually included in WorkspaceActions.saveLayout's output. See PanelInfo.serializable.types.ts:178
serializablebooleanWhether this panel's current props can round-trip through saveLayout()/loadLayout(). Computed automatically — true when no props were passed, or when they were and passed isSerializable. A panel with serializable: false still renders and works normally; it's simply excluded from the next saveLayout() call (and pruned from gridRoot/ floating/minimized in that saved snapshot) rather than corrupting or throwing.types.ts:184
state"docked" | "floating" | "minimized"Current workspace placement mode.types.ts:164
titlestring | MessageDescriptor | (() => string)Plain text label or localizable message descriptor.types.ts:160

PanelOwner ​

Defined in: types.ts:231

Who a hosted panel belongs to: see PanelInfo.owner. (7.11.0)

Properties ​

PropertyTypeDescriptionDefined in
panelIdstringThe panel whose overlay opened the widget.types.ts:233
widgetIdstringThe widget's id in that overlay (useFloatingWidgets().open(id, …)).types.ts:235

PanelRegistryEntry ​

Defined in: components/PanelRegistry.ts:7

Represents a registered component configuration template inside the panel catalog registry.

Properties ​

PropertyTypeDescriptionDefined in
ComponentComponentType<any>The React component type registered.components/PanelRegistry.ts:10
defaultOptions?{ canClose?: boolean; canDock?: boolean; canDrag?: boolean; canFloat?: boolean; canMinimize?: boolean; canPopOut?: boolean; className?: string; defaultAnchor?: FloatAnchor; disableLivePreview?: boolean; favoritePosition?: { height: string | number; width: string | number; x: string | number; y: string | number; }; icon?: ReactNode; initialTarget?: "docked" | "floating" | "tabbed"; keepAlive?: boolean; preserveEmbeds?: boolean; renderHeaderActions?: (panelId) => ReactNode; tabClassName?: string; title?: | string | { defaultMessage?: string; id: string; values?: Record<string, string | number>; } | (() => string); }Default metadata settings configuration applied on instantiation.components/PanelRegistry.ts:12
defaultOptions.canClose?booleanEnables/disables closing actions for the tab/window.components/PanelRegistry.ts:39
defaultOptions.canDock?booleanfalse: the user can't dock this panel. Dragging it offers no group, tab or edge targets (corners still anchor a floating window), so it stays floating. The app's own docking calls always work; give the type initialTarget: 'floating' so it opens floating. Default true (7.9.0)components/PanelRegistry.ts:35
defaultOptions.canDrag?booleanEnables/disables window drag interactions.components/PanelRegistry.ts:22
defaultOptions.canFloat?booleanfalse: the user can't make this panel floating. A tab drag can't end in a floating window (dropped on nothing or on a corner, it stays where it was), and the "Float" and taskbar "Maximize" menu items are hidden. A window the app floated itself can still be moved. The app's own floatPanel always works. Default true (7.9.0)components/PanelRegistry.ts:29
defaultOptions.canMinimize?booleanEnables/disables minimizing of the panel instance.components/PanelRegistry.ts:37
defaultOptions.canPopOut?booleantrue: a panel of this type can move into its own browser window (7.12.0), from its "Open in new window" menu item or workspace.popOutPanel(id). Needs a workspace created with popOut: true. It gates the menu item and new calls only: a window already open stays open when this changes. Default falsecomponents/PanelRegistry.ts:77
defaultOptions.className?stringClass added to each panel of this type, on its own content element (.rdd-panel-content), which moves with the panel between groups, windows and the taskbar preview. (7.8.0)components/PanelRegistry.ts:50
defaultOptions.defaultAnchor?FloatAnchorCorner of the workspace to anchor newly-opened floating windows to.components/PanelRegistry.ts:41
defaultOptions.disableLivePreview?booleanDisables live WebGL rendering canvas thumbnails inside the taskbar hover popup previews.components/PanelRegistry.ts:43
defaultOptions.favoritePosition?{ height: string | number; width: string | number; x: string | number; y: string | number; }Custom default bounds applied when the container is floated.components/PanelRegistry.ts:20
defaultOptions.favoritePosition.heightstring | number-components/PanelRegistry.ts:20
defaultOptions.favoritePosition.widthstring | number-components/PanelRegistry.ts:20
defaultOptions.favoritePosition.xstring | number-components/PanelRegistry.ts:20
defaultOptions.favoritePosition.ystring | number-components/PanelRegistry.ts:20
defaultOptions.icon?ReactNodeIcon placed next to title tags.components/PanelRegistry.ts:16
defaultOptions.initialTarget?"docked" | "floating" | "tabbed"Initial mounting state inside the desktop layout grid.components/PanelRegistry.ts:18
defaultOptions.keepAlive?booleanfalse unmounts the panel's component while it is hidden (an unselected tab, or minimized) and mounts it afresh when it is shown, to free what a heavy, rarely shown panel holds. Its own state is lost each time; its tab, title and lifecycle continue (onClose is not called), and the taskbar shows a placeholder instead of a live preview. While it is unmounted, a guard it registered with useBeforeClose is not active (its dirty flag still is), and saveLayout() saves its open-time props. Default true: panels stay mounted and keep their state, as they always have. (7.8.0)components/PanelRegistry.ts:62
defaultOptions.preserveEmbeds?booleanKeep embedded documents and media alive when the panel moves (7.11.0): an <iframe> doesn't reload when the panel is docked, floated, minimised or restored. The library then moves the panel's element with moveBefore(), which keeps that state, in browsers that have it (Chrome and Edge 133+, Firefox 144+); in the others (Safari) it moves as before and an iframe reloads. Off by default. Default falsecomponents/PanelRegistry.ts:70
defaultOptions.renderHeaderActions?(panelId) => ReactNodeCustom header actions renderer, placing custom components in the window/tab titlebar.components/PanelRegistry.ts:45
defaultOptions.tabClassName?stringClass added to the tab of each panel of this type. (7.8.0)components/PanelRegistry.ts:52
defaultOptions.title?| string | { defaultMessage?: string; id: string; values?: Record<string, string | number>; } | (() => string)Tab and window headers text — plain string or i18n descriptor.components/PanelRegistry.ts:14

PanelSidebarSection ​

Defined in: components/PanelContributionContext.tsx:16

A single named, labeled slot of content a panel contributes to the app's Sidebar while active.

Properties ​

PropertyTypeDefined in
contentReactNodecomponents/PanelContributionContext.tsx:20
icon?ReactNodecomponents/PanelContributionContext.tsx:19
idstringcomponents/PanelContributionContext.tsx:17
labelstringcomponents/PanelContributionContext.tsx:18

PanelTitleDescriptor ​

Defined in: components/PanelProviderContext.tsx:15

Descriptor object for localizable panel titles, supporting context translation systems.

Properties ​

PropertyTypeDescriptionDefined in
defaultMessage?stringFallback string if translation key is missing.components/PanelProviderContext.tsx:19
idstringThe translation dictionary key.components/PanelProviderContext.tsx:17
values?Record<string, string | number>Parameters to inject into the translated text string.components/PanelProviderContext.tsx:21

PanelWindow ​

Defined in: components/workspace/panelWindow.tsx:10

The window and document a panel is shown in. See usePanelWindow. (7.12.0)

Extended by ​

Properties ​

PropertyTypeDefined in
documentDocumentcomponents/workspace/panelWindow.tsx:12
windowWindowcomponents/workspace/panelWindow.tsx:11

PointerDragConfig ​

Defined in: components/dragResize.ts:14

Shared pointer-drag-resize primitives.

Extracted from four previously-independent implementations (the workspace grid split resizer, the sidebar drawer resizer, and two floating-window resize-handle implementations) that had quietly drifted apart in exactly the kind of detail (an inline-style property present in one and missing in the other) that once caused a real, user-visible bug. This file is the single place that mechanic now lives, so it can't drift again.

Type Parameters ​

Type Parameter
TStart

Properties ​

PropertyTypeDescriptionDefined in
activeClasses?{ classes: string[]; el: HTMLElement; }[]Classes toggled on the given elements for the duration of the drag.components/dragResize.ts:33
captureStart() => TStartSnapshot whatever state the caller needs at drag start (sizes, positions, ...).components/dragResize.ts:22
elementHTMLElementThe element to capture the pointer on — normally the handle the user grabbed.components/dragResize.ts:16
onCancel?(start) => voidCalled instead of onEnd when the drag is cut short: the window loses focus, or the pointer capture is lost (the element was removed mid-drag). Without it, onEnd is called. (7.9.0)components/dragResize.ts:31
onEnd?(start) => voidCalled once when the drag ends (pointerup or pointercancel).components/dragResize.ts:26
onMove(dx, dy, start) => voidCalled on every pointermove with the delta from the drag's start position.components/dragResize.ts:24
pointerIdnumber-components/dragResize.ts:17
startClientXnumberThe pointerdown event's clientX/clientY, used as the delta origin.components/dragResize.ts:19
startClientYnumber-components/dragResize.ts:20

PopoutWrapperProps ​

Defined in: components/workspace/panelWindow.tsx:16

The props of <DockableDesktopProvider popoutWrapper>. (7.12.0)

Extends ​

Properties ​

PropertyTypeInherited fromDefined in
childrenReactNode-components/workspace/panelWindow.tsx:17
documentDocumentPanelWindow.documentcomponents/workspace/panelWindow.tsx:12
windowWindowPanelWindow.windowcomponents/workspace/panelWindow.tsx:11

RddAlertProps ​

Defined in: forms/AlertForm.tsx:10

Props for the RddAlert component.

Properties ​

PropertyTypeDescriptionDefined in
alertType?"info" | "warning" | "success" | "danger"Picks the built-in icon and its colour. Defaults to 'info'.forms/AlertForm.tsx:18
icon?ReactNodeThe icon left of the message. Omit it for the built-in icon of alertType, pass null for none, or pass your own node. It is coloured by alertType.forms/AlertForm.tsx:23
message| string | { defaultMessage?: string; id: string; values?: any; }Main message text or localizable descriptor to display.forms/AlertForm.tsx:16
okLabel?| string | { defaultMessage?: string; id: string; values?: any; }Label of the button. Defaults to the ok predefined message.forms/AlertForm.tsx:26
onSettled?() => voidFired exactly once, however the dialog ends: the OK button, Enter, Escape, the backdrop, the × or the modal being closed by code.forms/AlertForm.tsx:31
title?| string | { defaultMessage?: string; id: string; values?: any; } | (() => string)Optional custom title text or localizable descriptor for the dialog container.forms/AlertForm.tsx:13

RddConfirmProps ​

Defined in: forms/ConfirmationForm.tsx:10

Props for the RddConfirm component.

Properties ​

PropertyTypeDescriptionDefined in
alert?stringOptional auxiliary top alert notification text.forms/ConfirmationForm.tsx:18
alertType?"info" | "warning" | "success" | "danger"Type style classification for the alert notice banner.forms/ConfirmationForm.tsx:20
icon?ReactNodeThe icon left of the message. Omit it for the built-in question icon, pass null for none, or pass your own node. It is coloured by alertType.forms/ConfirmationForm.tsx:36
message| string | { defaultMessage?: string; id: string; values?: any; }Main message text or localizable descriptor to display.forms/ConfirmationForm.tsx:16
onCancel?() => voidCallback fired when the user selects the cancel button.forms/ConfirmationForm.tsx:26
onOK?() => voidCallback fired when the user selects the confirm button.forms/ConfirmationForm.tsx:24
onSettled?(ok) => voidFired exactly once, however the dialog ends: true for the confirm button (or Enter), false for the cancel button, Escape, the backdrop, the × or the modal being closed by code.forms/ConfirmationForm.tsx:31
title?| string | { defaultMessage?: string; id: string; values?: any; } | (() => string)Optional custom title text or localizable descriptor for the dialog container.forms/ConfirmationForm.tsx:13
useYesNoTitles?booleanIf true, changes action button labels to 'Yes' and 'No' instead of 'OK' and 'Cancel'.forms/ConfirmationForm.tsx:22

RddDesktopProps ​

Defined in: components/WindowManager.tsx:52

Props for <RddDesktop>.

Properties ​

PropertyTypeDescriptionDefined in
animations?booleanEnables the library's own transitions/animations (tab hover, dock preview, etc.). Never affects the consumer's own page. Default truecomponents/WindowManager.tsx:66
defaultPanelIcon?ReactNodeFallback icon shown in panel tabs when no panel-specific icon is provided.components/WindowManager.tsx:56
emptyWorkspace?ReactNodeWhat the workspace shows while no panel is docked: a welcome screen, a "pick a file" prompt. It fills the empty group in place of the built-in message; the group stays a drop target, so a floating window can still be docked into it. Floating windows still show over it. (7.8.0)components/WindowManager.tsx:72
renderTabContent?(tab) => ReactNodeYour own content for each tab in the grid: an icon, the title, a badge, a status dot (7.10.0). It replaces the built-in icon, title and dirty marker; the tab itself (dragging, keyboard, accessibility, its context menu, header actions and close button) stays the library's. Called with the tab's TabContentProps; branch on component for a per-type look.components/WindowManager.tsx:79
skin?stringBuilt-in skin name or a custom skin key registered via CSS. Default 'vscode'components/WindowManager.tsx:54
taskbarVisibility?TaskbarVisibilityControls taskbar visibility. - 'always' — permanent bar at the bottom - 'compact' — only visible when minimized panels exist, or a panel is in its own window (7.12.0) - 'autohide' — overlay bar with 8 px peek strip (default), shown under the same condition as 'compact' Default 'autohide'components/WindowManager.tsx:64

RddFloatingWidgetProps ​

Defined in: components/panelOverlay/FloatingWidget.tsx:25

Props for <RddFloatingWidget>.

Methods ​

onClose() ​
ts
onClose(): void;

Defined in: components/panelOverlay/FloatingWidget.tsx:35

Called when the user clicks the × button. Set open to false in response.

Returns ​

void

Properties ​

PropertyTypeDescriptionDefined in
children?ReactNode-components/panelOverlay/FloatingWidget.tsx:71
defaultAnchorFloatAnchorCorner of the panel to dock to on first render. See FloatAnchorcomponents/panelOverlay/FloatingWidget.tsx:37
defaultHeightnumberInitial height in pixels. Ignored on an axis that starts stretched, and restored to when that axis is later released.components/panelOverlay/FloatingWidget.tsx:43
defaultStretch?StretchWhich axes span the panel on first render. Uncontrolled: gestures update it from here. See Stretchcomponents/panelOverlay/FloatingWidget.tsx:48
defaultWidthnumberInitial width in pixels. Ignored on an axis that starts stretched, and restored to when that axis is later released.components/panelOverlay/FloatingWidget.tsx:40
icon?ReactNodeOptional icon shown to the left of the title in the header.components/panelOverlay/FloatingWidget.tsx:31
idstringUnique identifier within the panel overlay. Used for z-order and stack tracking.components/panelOverlay/FloatingWidget.tsx:27
onPlacementChange?(placement) => voidCalled whenever a gesture changes where the widget sits — a stretched axis released, a re-dock, or a detach. Reports anchor and stretch together, because one gesture can change both at once and reporting them separately would surface a state that is never valid. This is also the only way to persist placement: the library serialises nothing about inner widgets, so store what you receive here and feed it back via defaultAnchor/stretch.components/panelOverlay/FloatingWidget.tsx:65
openbooleanWhether the window is mounted and visible. Set to false to close/unmount it.components/panelOverlay/FloatingWidget.tsx:33
stretch?Stretch | nullControlled stretch state. When provided — including as null — the caller is the single source of truth: gestures report through RddFloatingWidgetProps.onPlacementChange instead of updating internally, and the caller must echo the new value back. Omit entirely (undefined) for uncontrolled behaviour, matching ToolbarToggleItem.active and Sidebar.activeTabId.components/panelOverlay/FloatingWidget.tsx:56
stretchable?booleanWhether this widget may span the panel at all. false disables resize-to-stretch snapping, for content that only makes sense at a bounded size. Default true.components/panelOverlay/FloatingWidget.tsx:70
titlePanelTitleText shown in the window's header bar. Accepts a plain string or an i18n message descriptor.components/panelOverlay/FloatingWidget.tsx:29

RddPanelOverlayProps ​

Defined in: components/panelOverlay/PanelOverlayRoot.tsx:56

Props for <RddPanelOverlay>.

Properties ​

PropertyTypeDefined in
childrenReactNodecomponents/panelOverlay/PanelOverlayRoot.tsx:57
className?stringcomponents/panelOverlay/PanelOverlayRoot.tsx:58
style?CSSPropertiescomponents/panelOverlay/PanelOverlayRoot.tsx:59

RddPanelToolbarProps ​

Defined in: components/panelOverlay/PanelToolbar.tsx:19

Props for <RddPanelToolbar>.

Properties ​

PropertyTypeDescriptionDefined in
buttonSize?numberButton size in pixels for all buttons in this toolbar (sets --rdd-panel-toolbar-btn-size). The icon inside follows --rdd-panel-toolbar-icon-size. Falls back to the stylesheet when unset.components/panelOverlay/PanelToolbar.tsx:27
buttonVariant?ButtonVariantDefault button style inherited by ToolbarButton and ToolbarToggle children. Default 'ghost'components/panelOverlay/PanelToolbar.tsx:25
children?ReactNode-components/panelOverlay/PanelToolbar.tsx:30
className?string-components/panelOverlay/PanelToolbar.tsx:29
positionToolbarPositionEdge of the panel overlay to attach to. See ToolbarPositioncomponents/panelOverlay/PanelToolbar.tsx:21
style?CSSProperties-components/panelOverlay/PanelToolbar.tsx:28
variant?ToolbarVariantBackground style of the toolbar strip. Default 'transparent'components/panelOverlay/PanelToolbar.tsx:23

RddSidebarProps ​

Defined in: components/Sidebar.tsx:122

Properties ​

PropertyTypeDescriptionDefined in
activeTabId?string | nullControlled active tab id. Omit to use internal state.components/Sidebar.tsx:152
children?ReactNodeMain workspace content rendered alongside the sidebar.components/Sidebar.tsx:206
defaultWidth?numberInitial drawer width in pixels. Default: 280components/Sidebar.tsx:144
footerAction?| SidebarRailEntry | SidebarRailEntry[]Mirror of headerAction, pinned to the bottom of the tab strip via its own .rdd-sidebar-footer-area — e.g. a "Settings" tab that should always sit at the bottom regardless of tab count. Override --rdd-sidebar-footer-area-padding-top/ --rdd-sidebar-footer-area-padding-bottom (both default 8px) to control its spacing.components/Sidebar.tsx:142
headerAction?| SidebarRailEntry | SidebarRailEntry[]One or more non-toggling action buttons and/or real tabs shown above the tabs, in their own .rdd-sidebar-header-area — independent of the tabs' own inter-item gap. Pass a single { icon, label, onClick }/{ render } object (the common case), or an array mixing action buttons, custom renders, and SidebarTab entries — a tab entry here behaves exactly like a main-list tab (mounts, activates, closes through the same lifecycle). Override --rdd-sidebar-header-area-padding-top/--rdd-sidebar-header-area-padding-bottom (both default 8px) to control its spacing/effective height.components/Sidebar.tsx:135
hideDefaultHeader?booleanSuppress the library's own drawer header (title + showCloseButton's close button) for every tab, so renderHeader (or each tab's own renderContent) can supply a header, border, and styling instead. Applies uniformly across all tabs — there's no per-tab override. Passing renderHeader by itself has the same suppressing effect even if this is left unset — the two conditions are combined with OR, precisely so that supplying renderHeader alone is never a silent no-op. The close mechanism is unaffected either way: the onClose parameter passed to renderContent/renderHeader, or useSidebarTab().onClose from anywhere in a tab's content tree. Default: falsecomponents/Sidebar.tsx:183
maxWidth?numberMaximum drawer width in pixels during drag-resize. Default: 600components/Sidebar.tsx:148
minWidth?numberMinimum drawer width in pixels during drag-resize. Default: 150components/Sidebar.tsx:146
onActiveTabChange?(tabId) => voidCalled when the active tab changes.components/Sidebar.tsx:154
onStripVisibilityChange?(visible) => voidCalled when showStrip/hideStrip is invoked on the imperative handle.components/Sidebar.tsx:162
onVisibilityChange?(visible) => voidCalled when show/hide/toggle is invoked on the imperative handle.components/Sidebar.tsx:158
onWidthChange?(px) => voidCalled during drag resize and on setWidth() with the new pixel width.components/Sidebar.tsx:150
position?"left" | "right"Which side the activity bar and drawer appear on. Default: 'right'components/Sidebar.tsx:124
renderHeader?(tab, onClose, onOpen) => ReactNodeCustom header renderer used in place of the library's own drawer header. Passing renderHeader is by itself sufficient to suppress the default header, whether or not hideDefaultHeader is also set — the two props are combined with OR. Called once for whichever tab is currently active, so the same header markup (e.g. a hamburger icon, a search field, a close button) is shared uniformly across every tab instead of being repeated inside each tab's own renderContent. Omit renderHeader and set hideDefaultHeader: true to render no header at all and let each tab's renderContent supply its own instead.components/Sidebar.tsx:198
showCloseButton?booleanShow an "X" close button in the expanded drawer's header, as an additional way to collapse the sidebar (equivalent to clicking the active tab's own icon again). Opt-in. Default: false. Has no effect once the default header is suppressed — via hideDefaultHeader, or simply by passing renderHeader (either one is sufficient) — since the entire default header, this button included, is skipped for every tab in that case.components/Sidebar.tsx:170
stripVisible?booleanCollapse only the activity bar strip, leaving the drawer unaffected. Default: truecomponents/Sidebar.tsx:160
tabsSidebarTab[]-components/Sidebar.tsx:125
visible?booleanCollapse the entire sidebar (strip + drawer). Default: truecomponents/Sidebar.tsx:156

RddSidePanelsProps ​

Defined in: api/index.tsx:366

Props for RddSidePanels.

Properties ​

PropertyTypeDescriptionDefined in
defaultWidth?string | numberWidth used when an openLeft/openRight call doesn't give one. Number = px. Default 400api/index.tsx:370
side?"left" | "right"Render only one side's drawer. Omit to render both.api/index.tsx:368

RddToastsProps ​

Defined in: components/Toast.tsx:58

Props for <RddToasts>. Mount one instance at your app root, alongside <RddModals>.

Example ​

ts
<RddToasts position="top-right" progressBar />

Properties ​

PropertyTypeDescriptionDefined in
adapter?ToastAdapterDelegate all toast.* calls to a custom renderer (Ant Design, MUI, Sonner, etc.).components/Toast.tsx:78
animation?"none" | "slide" | "fade"Entry/exit animation style. Default 'slide'components/Toast.tsx:70
defaultClosable?booleanShow the × close button on all notifications unless overridden per-toast. Default truecomponents/Toast.tsx:66
defaultDuration?numberDefault auto-dismiss delay in ms. 0 = all notifications sticky. Default 5000components/Toast.tsx:64
maxVisible?numberMaximum number of notifications shown simultaneously. Extras are queued. Default 3components/Toast.tsx:62
newestOnTop?booleanWhen true, newest notification appears at the top of the stack. Default falsecomponents/Toast.tsx:72
pauseOnHover?booleanPause the auto-dismiss timer while the cursor is over a notification. Default truecomponents/Toast.tsx:68
position?ToastPositionWhere notifications appear in the viewport. Default 'top-right'components/Toast.tsx:60
progressBar?booleanShow a countdown progress bar at the bottom of each notification. Default falsecomponents/Toast.tsx:74
width?numberWidth of each notification card in pixels. Default 320components/Toast.tsx:76

RddToolbarButtonProps ​

Defined in: components/panelOverlay/PanelToolbar.tsx:118

Props for <RddToolbarButton>.

Methods ​

onClick() ​
ts
onClick(): void;

Defined in: components/panelOverlay/PanelToolbar.tsx:122

Click handler.

Returns ​

void

Properties ​

PropertyTypeDescriptionDefined in
disabled?boolean-components/panelOverlay/PanelToolbar.tsx:123
iconReactNodeButton icon: an SVG, an icon component or an icon-font glyph. Pass no size: the library sizes it with --rdd-panel-toolbar-icon-size.components/panelOverlay/PanelToolbar.tsx:120
title?stringTooltip text and accessible aria-label.components/panelOverlay/PanelToolbar.tsx:125
variant?ButtonVariantVisual style override. Falls back to the parent PanelToolbar's buttonVariant.components/panelOverlay/PanelToolbar.tsx:127

RddToolbarProps ​

Defined in: components/Toolbar.tsx:147

Properties ​

PropertyTypeDescriptionDefined in
className?string-components/Toolbar.tsx:156
itemsToolbarItem[]Ordered list of items to render.components/Toolbar.tsx:151
onVisibilityChange?(visible) => voidCalled when show/hide/toggle is invoked on the imperative handle.components/Toolbar.tsx:155
position?"left" | "top" | "right" | "bottom"Side the strip is attached to. Controls strip orientation. Default: 'left'components/Toolbar.tsx:149
style?CSSProperties-components/Toolbar.tsx:157
visible?booleanCollapse the strip to zero width/height. State is preserved — no unmount.components/Toolbar.tsx:153

RddToolbarSearchProps ​

Defined in: components/panelOverlay/ToolbarSearch.tsx:27

Props for <RddToolbarSearch>.

Methods ​

onSearch() ​
ts
onSearch(query, signal): 
  | SearchResult[]
| Promise<SearchResult[]>;

Defined in: components/panelOverlay/ToolbarSearch.tsx:35

Called with the current query and an AbortSignal each time the input changes (debounced). Return SearchResult[] directly for synchronous sources, or Promise<SearchResult[]> for async. Abort in-flight requests when the signal fires to prevent stale result races.

Parameters ​
ParameterType
querystring
signalAbortSignal
Returns ​

| SearchResult[] | Promise<SearchResult[]>

onSelect() ​
ts
onSelect(result): void;

Defined in: components/panelOverlay/ToolbarSearch.tsx:37

Called when the user selects a result from the dropdown.

Parameters ​
ParameterType
resultSearchResult
Returns ​

void

Properties ​

PropertyTypeDescriptionDefined in
placeholder?stringPlaceholder text shown in the expanded input field. Default the searchPlaceholder message ('Search…')components/panelOverlay/ToolbarSearch.tsx:29

RddToolbarToggleProps ​

Defined in: components/panelOverlay/PanelToolbar.tsx:150

Props for <RddToolbarToggle>.

Methods ​

onToggle() ​
ts
onToggle(): void;

Defined in: components/panelOverlay/PanelToolbar.tsx:156

Called when the button is clicked. Toggle active in response.

Returns ​

void

Properties ​

PropertyTypeDescriptionDefined in
activebooleanWhether the toggle is in the active/pressed state. Sets aria-pressed automatically.components/panelOverlay/PanelToolbar.tsx:154
disabled?boolean-components/panelOverlay/PanelToolbar.tsx:157
iconReactNodeButton icon: an SVG, an icon component or an icon-font glyph. Pass no size: the library sizes it with --rdd-panel-toolbar-icon-size.components/panelOverlay/PanelToolbar.tsx:152
title?stringTooltip text and accessible aria-label.components/panelOverlay/PanelToolbar.tsx:159
variant?ButtonVariantVisual style override. Falls back to the parent PanelToolbar's buttonVariant.components/panelOverlay/PanelToolbar.tsx:161

ResizeConstraints ​

Defined in: components/dragResize.ts:89

Properties ​

PropertyTypeDescriptionDefined in
maxH?numberUpper bound on height — only applies to southward growth (dir includes 's').components/dragResize.ts:95
maxW?numberUpper bound on width — only applies to eastward growth (dir includes 'e').components/dragResize.ts:93
minHnumber-components/dragResize.ts:91
minWnumber-components/dragResize.ts:90
minX?numberLower bound on the resulting x — only applies to westward growth (dir includes 'w').components/dragResize.ts:97
minY?numberLower bound on the resulting y — only applies to northward growth (dir includes 'n').components/dragResize.ts:99

ResizeRect ​

Defined in: components/dragResize.ts:82

Properties ​

PropertyTypeDefined in
hnumbercomponents/dragResize.ts:86
wnumbercomponents/dragResize.ts:85
xnumbercomponents/dragResize.ts:83
ynumbercomponents/dragResize.ts:84

ResolvedToastOptions ​

Defined in: components/Toast.tsx:43

Fully-resolved options passed to ToastAdapter.show() and ToastAdapter.update(). All optional ToastOptions fields are resolved against the container defaults.

Properties ​

PropertyTypeDefined in
closablebooleancomponents/Toast.tsx:47
content?ReactNodecomponents/Toast.tsx:49
durationnumbercomponents/Toast.tsx:46
icon?ReactNodecomponents/Toast.tsx:48
idstringcomponents/Toast.tsx:44
onClose?() => voidcomponents/Toast.tsx:50
typeToastTypecomponents/Toast.tsx:45

SearchResult ​

Defined in: components/panelOverlay/ToolbarSearch.tsx:13

A single result item returned by RddToolbarSearchProps.onSearch.

Properties ​

PropertyTypeDescriptionDefined in
description?stringOptional secondary text shown below the label in the dropdown.components/panelOverlay/ToolbarSearch.tsx:19
group?stringOptional group header used to bucket results visually.components/panelOverlay/ToolbarSearch.tsx:21
icon?ReactNodeOptional icon shown to the left of the label.components/panelOverlay/ToolbarSearch.tsx:23
idstringUnique identifier for this result — passed to onSelect.components/panelOverlay/ToolbarSearch.tsx:15
labelstringPrimary display text.components/panelOverlay/ToolbarSearch.tsx:17

SerializedLayout ​

Defined in: types.ts:685

The on-disk shape produced by saveLayout() and accepted by loadLayout()/initialState.

Properties ​

PropertyTypeDescriptionDefined in
activePanelId?string | nullThe globally active panel at save time — the one the user was actually looking at. Omitted when nothing was active, and when the active panel didn't survive this snapshot's serializability pruning (see WorkspaceActions.saveLayout) — so it never names a panel absent from this payload's own panels. Absent on every layout saved before this field existed, in which case the restore derives it from gridRoot's own per-leaf selection instead; a present-but-no-longer-valid value falls back to the same derivation. version is deliberately not bumped for this: the field is optional and its absence is a supported, fully-handled case rather than a schema a migration has to branch on.types.ts:699
floatingFloatingWindow[]-types.ts:701
gridRootLayoutNode-types.ts:700
minimized{ component: string; id: string; title: string | MessageDescriptor | (() => string); }[]-types.ts:702
panelsRecord<string, PanelInfo>-types.ts:703
version?numberSchema version — absent on layouts saved before this field was introduced (treated as 0).types.ts:687

ShowContextMenuOptions ​

Defined in: components/ContextMenu.tsx:58

Properties ​

PropertyTypeDescriptionDefined in
dir?"rtl" | "ltr"The menu's direction. By default it is the direction of the element the menu was opened from (the event's target); a workspace's showContextMenu passes its own direction for a menu opened without an event. The menu is portaled to <body>, so it can't inherit either.components/ContextMenu.tsx:76
document?DocumentThe document the menu opens in (7.13.0): a pop-out window's, or the page's. Seldom needed. Left out, it is the event's target's; with no event, the window of the panel that called useContextMenu(), else the window the user is in. Ignored when its window has closed. A custom ContextMenuAdapter always receives it, already chosen: portal the menu into its <body>.components/ContextMenu.tsx:70
event?| MouseEvent | TouchEvent | MouseEvent<Element, MouseEvent> | TouchEvent<Element>-components/ContextMenu.tsx:59
initialFocus?"menu" | "first-item"Where focus goes when the menu opens. 'menu' (the default) focuses the menu itself, with no item highlighted: ArrowDown then reaches the first item and ArrowUp the last. 'first-item' focuses the first enabled item, for a menu opened from the keyboard. When this is left out, a keyboard contextmenu event (the ContextMenu key or Shift+F10, which report no pointer position) opens on the first item and everything else, including a call with no event, on the menu: the same view every time, whatever the user did before.components/ContextMenu.tsx:85
itemsContextMenuItem[]-components/ContextMenu.tsx:62
x?number-components/ContextMenu.tsx:60
y?number-components/ContextMenu.tsx:61

SidebarActionButton ​

Defined in: components/Sidebar.tsx:71

Simple case for RddSidebarProps.headerAction/footerAction: the library renders a default-styled icon button (visually consistent with the regular tab buttons) and forwards the click.

Properties ​

PropertyTypeDescriptionDefined in
disabled?boolean-components/Sidebar.tsx:78
iconReactNode-components/Sidebar.tsx:74
id?stringOnly needed when used inside a SidebarRailEntry[] array, for the React key.components/Sidebar.tsx:73
labelstringTooltip and aria-label — same convention as SidebarTab.label.components/Sidebar.tsx:76
onClick() => void-components/Sidebar.tsx:77

SidebarContext ​

Defined in: components/Sidebar.tsx:229

Value provided by useSidebar(). Available to any component inside the <RddSidebar> React tree, including panels rendered via {children}.

Properties ​

PropertyTypeDescriptionDefined in
closeDrawer() => void-components/Sidebar.tsx:231
getActiveTab() => string | null-components/Sidebar.tsx:232
isSecondarybooleanTrue if this instance is a <RddSecondarySidebar>, false for a primary <RddSidebar>.components/Sidebar.tsx:236
openTab(tabId) => void-components/Sidebar.tsx:230
position"left" | "right"Which side this Sidebar instance is rendering on.components/Sidebar.tsx:234

SidebarCustomEntry ​

Defined in: components/Sidebar.tsx:87

Full-control case for RddSidebarProps.headerAction/footerAction: the consumer supplies their own markup (a Material UI IconButton, a Bootstrap Button, a Tailwind-styled <button>, or anything else) wholesale. The library renders exactly what this returns, unwrapped, so the consumer's own hover/active/focus/ripple behavior and click handling are untouched.

Properties ​

PropertyTypeDescriptionDefined in
id?stringOnly needed when used inside a SidebarRailEntry[] array, for the React key.components/Sidebar.tsx:89
render() => ReactNode-components/Sidebar.tsx:90

SidebarHandle ​

Defined in: components/Sidebar.tsx:212

Imperative handle exposed by <RddSidebar ref={...}>.

Properties ​

PropertyTypeDefined in
closeDrawer() => voidcomponents/Sidebar.tsx:214
getActiveTab() => string | nullcomponents/Sidebar.tsx:215
getWidth() => numbercomponents/Sidebar.tsx:222
hide() => voidcomponents/Sidebar.tsx:217
hideStrip() => voidcomponents/Sidebar.tsx:220
openTab(tabId) => voidcomponents/Sidebar.tsx:213
setWidth(px) => voidcomponents/Sidebar.tsx:221
show() => voidcomponents/Sidebar.tsx:216
showStrip() => voidcomponents/Sidebar.tsx:219
toggle() => voidcomponents/Sidebar.tsx:218

SidebarTab ​

Defined in: components/Sidebar.tsx:32

Per-tab configuration supplied by the consuming application.

Properties ​

PropertyTypeDescriptionDefined in
eagerMount?booleanMount immediately when the Sidebar first renders, not on first user click. Implies preserveState: true. Default: falsecomponents/Sidebar.tsx:50
hidden?booleanOmit this tab's rail button entirely — no icon, no click target — while it remains fully openable via openTab() / useSidebar().openTab() / a controlled activeTabId. Use for menu-driven panels with no persistent icon (e.g. a Google-Maps-style hamburger that opens content not otherwise pinned to the rail). Default: falsecomponents/Sidebar.tsx:44
icon?ReactNodeRequired unless hidden is true — a hidden tab never renders a rail button, so it has no icon to show.components/Sidebar.tsx:36
idstring-components/Sidebar.tsx:33
labelstring-components/Sidebar.tsx:34
preserveState?booleanKeep the component alive behind display: none when closed instead of unmounting it. Use for panels with expensive local state. Default: falsecomponents/Sidebar.tsx:56
renderContent(tabId, onClose, onOpen) => ReactNodeCalled to obtain the drawer content for this tab.components/Sidebar.tsx:63

SidebarTabContext ​

Defined in: components/Sidebar.tsx:243

Value provided by useSidebarTab(). Available only to components rendered inside a sidebar tab's renderContent tree.

Properties ​

PropertyTypeDefined in
onClose() => voidcomponents/Sidebar.tsx:246
onOpen() => voidcomponents/Sidebar.tsx:245
openTab(tabId) => voidcomponents/Sidebar.tsx:247
tabIdstringcomponents/Sidebar.tsx:244

SidePanelOptions ​

Defined in: components/PanelProviderContext.tsx:33

Configuration options applied when opening a SidePanel.

Properties ​

PropertyTypeDescriptionDefined in
bodyPadding?string | numberCSS padding for the panel body content — a number (px) or any CSS value/shorthand (e.g. '10px 16px'). Default: 0 (edge-to-edge) — pass 10 to restore the pre-v6.0.0 default, or any value your content needs.components/PanelProviderContext.tsx:45
icon?ReactNodeIcon displayed next to the panel title.components/PanelProviderContext.tsx:37
title?PanelTitleDisplay title for the side-panel header.components/PanelProviderContext.tsx:35
width?string | numberSpecific CSS width (e.g. 300, '40%') for the panel container.components/PanelProviderContext.tsx:39

SidePanelsApi ​

Defined in: api/index.tsx:305

Returned by useSidePanels.

Properties ​

PropertyTypeDescriptionDefined in
close(id) => void-api/index.tsx:310
closeAll() => voidCloses both drawers.api/index.tsx:312
get(id) => OverlayInstance | undefined-api/index.tsx:313
leftOverlayInstance | null-api/index.tsx:306
openLeft<P>(component, props, options?) => Promise<string | null>-api/index.tsx:308
openRight<P>(component, props, options?) => Promise<string | null>-api/index.tsx:309
rightOverlayInstance | null-api/index.tsx:307
setDirty(id, dirty, options?) => void-api/index.tsx:315
update(id, updates) => void-api/index.tsx:314

TabContentProps ​

Defined in: types.ts:62

What renderTabContent receives for each tab (7.10.0). title is already formatted and icon is the icon the built-in content shows, so the built-in content is one line to re-create: <>{icon} {title}{dirty && ' *'}</>.

Properties ​

PropertyTypeDescriptionDefined in
componentstringThe panel's registered kind: branch on it for a per-type look.types.ts:66
dirtybooleanHas unsaved changes; the built-in content shows *.types.ts:72
focusedbooleanThe workspace's active panel.types.ts:76
iconReactNodeThe icon the built-in content shows: set at runtime, else the registration's, else the default.types.ts:70
panelIdstringThe panel's instance id.types.ts:64
selectedbooleanThe tab shown in its group.types.ts:74
titlestringThe title, formatted: messages resolved, functions called.types.ts:68

ToastAdapter ​

Defined in: components/Toast.tsx:101

Strategy interface for replacing the built-in toast renderer with an external library. Pass an instance via <RddToasts adapter={...} /> to redirect all toast.* calls without changing any call sites in your application.

See ​

RddToastsProps.adapter

Methods ​

dismiss() ​
ts
dismiss(id?): void;

Defined in: components/Toast.tsx:107

Called to dismiss one notification (id provided) or all active notifications (no id).

Parameters ​
ParameterType
id?string
Returns ​

void

show() ​
ts
show(
   id, 
   message, 
   options): void;

Defined in: components/Toast.tsx:103

Called when a new notification is requested.

Parameters ​
ParameterType
idstring
messageReactNode
optionsResolvedToastOptions
Returns ​

void

update() ​
ts
update(
   id, 
   message, 
   options): void;

Defined in: components/Toast.tsx:105

Called when an existing notification is updated (e.g. after toast.promise() resolves).

Parameters ​
ParameterType
idstring
messageReactNode
optionsPartial<ResolvedToastOptions>
Returns ​

void

Properties ​

PropertyTypeDescriptionDefined in
Container| ComponentType<{ position: ToastPosition; }> | nullnull means the adapter manages its own DOM and <RddToasts> renders nothing. A component causes <RddToasts> to portal-render it with a position prop.components/Toast.tsx:112

ToastFunction() ​

Defined in: components/Toast.tsx:186

Type of the toast singleton. Callable directly or via named shorthand methods. Import this type to annotate variables or props that accept the toast object.

Example ​

ts
function notify(fn: ToastFunction) { fn.success('Done!'); }
ts
ToastFunction(msg, opts?): string;

Defined in: components/Toast.tsx:188

Show a notification. opts.type defaults to 'info'. Returns the notification ID.

Parameters ​

ParameterType
msgReactNode
opts?ToastOptions

Returns ​

string

Properties ​

PropertyTypeDescriptionDefined in
dismiss(id?) => voidDismiss a notification by ID, or all active notifications when called with no argument.components/Toast.tsx:198
error(msg, opts?) => stringShow an error notification. Returns the notification ID.components/Toast.tsx:196
info(msg, opts?) => stringShow an info notification. Returns the notification ID.components/Toast.tsx:190
promise<T>(promise, messages, opts?) => Promise<T>Track a promise through pending → success/error states. Shows a sticky pending notification immediately, then transitions it on settlement.components/Toast.tsx:204
success(msg, opts?) => stringShow a success notification. Returns the notification ID.components/Toast.tsx:192
warning(msg, opts?) => stringShow a warning notification. Returns the notification ID.components/Toast.tsx:194

ToastOptions ​

Defined in: components/Toast.tsx:22

Per-notification options passed to toast(), toast.info(), etc. All fields are optional and fall back to <RddToasts> defaults when unset.

Properties ​

PropertyTypeDescriptionDefined in
closable?booleanShow the × close button on this notification. Default from containercomponents/Toast.tsx:30
content?ReactNodeReplace the string message with arbitrary JSX.components/Toast.tsx:34
duration?numberAuto-dismiss delay in ms. 0 = sticky (never auto-dismisses). Default from containercomponents/Toast.tsx:26
icon?ReactNodeOverride the built-in type icon with arbitrary content.components/Toast.tsx:32
id?stringExplicit ID for dedup — calling toast.* with the same id updates the existing card in-place.components/Toast.tsx:28
onClose?() => voidCalled when the notification is dismissed by timer, close button, or toast.dismiss().components/Toast.tsx:36
type?ToastTypeVisual type. Overridden by the toast.info/success/warning/error shorthands. Default 'info'components/Toast.tsx:24

ToastPromiseMessages ​

Defined in: components/Toast.tsx:86

Message set for toast.promise(). Each field may be static content or a function that receives the resolved/rejected value and returns renderable content.

Type Parameters ​

Type ParameterDescription
TThe resolved value type of the tracked promise.

Properties ​

PropertyTypeDescriptionDefined in
errorReactNode | ((err) => ReactNode)Shown on rejection. Pass a function to include the error reason.components/Toast.tsx:92
pendingReactNodeShown while the promise is pending.components/Toast.tsx:88
successReactNode | ((result) => ReactNode)Shown on fulfillment. Pass a function to include the resolved value.components/Toast.tsx:90

ToolbarActionItem ​

Defined in: components/Toolbar.tsx:23

A one-shot action button.

Properties ​

PropertyTypeDefined in
disabled?booleancomponents/Toolbar.tsx:29
iconReactNodecomponents/Toolbar.tsx:27
idstringcomponents/Toolbar.tsx:25
labelstringcomponents/Toolbar.tsx:26
onClick() => voidcomponents/Toolbar.tsx:28
type"action"components/Toolbar.tsx:24

ToolbarContextValue ​

Defined in: components/ToolbarContext.tsx:9

Properties ​

PropertyTypeDescriptionDefined in
getActiveInGroup(group) => string | nullReturns the active item id in a radio group, or null if none.components/ToolbarContext.tsx:11
isModifierActive(id) => booleanReturns whether a toggle modifier is currently active.components/ToolbarContext.tsx:15
setActiveInGroup(group, id) => voidSet the active item in a radio group (pass null to deselect all).components/ToolbarContext.tsx:13
setModifierActive(id, active) => voidExplicitly set a toggle modifier's active state.components/ToolbarContext.tsx:17
toggleModifier(id) => voidFlip a toggle modifier between active and inactive.components/ToolbarContext.tsx:19

ToolbarGroupItem ​

Defined in: components/Toolbar.tsx:112

A collapsed tool-family button that opens a flyout panel listing all sub-tools. Only one sub-tool may be active at a time (radio semantics). The parent button's icon morphs to show the currently active sub-tool.

Supports both uncontrolled mode (omit activeItemId — state lives in ToolbarContext) and controlled mode (provide activeItemId — the caller is the single source of truth and must update the prop in response to onActiveItemChange).

Properties ​

PropertyTypeDescriptionDefined in
activeItemId?string | nullControlled active sub-item id. When provided (even as null), the component reads this prop instead of ToolbarContext and fires onActiveItemChange on click instead of updating context. Omit (undefined) for uncontrolled behaviour.components/Toolbar.tsx:128
defaultIconReactNodeIcon shown when no sub-item is active.components/Toolbar.tsx:119
disabled?boolean-components/Toolbar.tsx:121
idstringServes as both the button ID and the radio group key in ToolbarContext.components/Toolbar.tsx:115
itemsToolbarGroupEntry[]-components/Toolbar.tsx:120
labelstringTooltip / aria-label shown when no sub-item is active.components/Toolbar.tsx:117
onActiveItemChange?(id) => voidCalled when the user selects a sub-item in controlled mode. The toolbar does not update itself — the caller must update activeItemId.components/Toolbar.tsx:133
type"group"-components/Toolbar.tsx:113

ToolbarGroupSubItem ​

Defined in: components/Toolbar.tsx:88

A single selectable sub-tool inside a group flyout. All sub-items in the same ToolbarGroupItem share one radio group keyed by the parent ToolbarGroupItem's id.

Properties ​

PropertyTypeDescriptionDefined in
disabled?boolean-components/Toolbar.tsx:94
iconReactNode-components/Toolbar.tsx:91
idstring-components/Toolbar.tsx:89
labelstring-components/Toolbar.tsx:90
onActivate?(id) => voidCalled when this sub-item is selected.components/Toolbar.tsx:96
shortcut?stringKeyboard shortcut displayed in the flyout panel.components/Toolbar.tsx:93

ToolbarHandle ​

Defined in: components/Toolbar.tsx:160

Methods ​

hide() ​
ts
hide(): void;

Defined in: components/Toolbar.tsx:162

Returns ​

void

show() ​
ts
show(): void;

Defined in: components/Toolbar.tsx:161

Returns ​

void

toggle() ​
ts
toggle(): void;

Defined in: components/Toolbar.tsx:163

Returns ​

void


ToolbarRadioItem ​

Defined in: components/Toolbar.tsx:33

A mutually-exclusive radio button within a named group.

Properties ​

PropertyTypeDescriptionDefined in
disabled?boolean-components/Toolbar.tsx:43
groupstring-components/Toolbar.tsx:36
iconReactNode-components/Toolbar.tsx:38
idstring-components/Toolbar.tsx:35
labelstring-components/Toolbar.tsx:37
onActivate?(id) => voidCalled when this item becomes active.components/Toolbar.tsx:42
shortcut?stringKeyboard shortcut hint — displayed in the group flyout; reserved for future custom tooltip.components/Toolbar.tsx:40
type"radio"-components/Toolbar.tsx:34

ToolbarSeparator ​

Defined in: components/Toolbar.tsx:75

A visual divider between button groups.

Properties ​

PropertyTypeDefined in
type"separator"components/Toolbar.tsx:76

ToolbarToggleItem ​

Defined in: components/Toolbar.tsx:56

An independent on/off toggle modifier (e.g. snap-to-grid).

Supports both uncontrolled mode (omit rdd-active — state lives in ToolbarContext, keyed by id) and controlled mode (provide rdd-active — the caller is the single source of truth and must update the prop in response to onToggle). Controlled mode is what lets independent instances of the same panel type report independent active state instead of colliding on a shared id.

Properties ​

PropertyTypeDescriptionDefined in
active?booleanControlled active state. When provided (even as false), the component reads this prop instead of ToolbarContext and does not update context on click. Omit (undefined) for uncontrolled behaviour.components/Toolbar.tsx:68
disabled?boolean-components/Toolbar.tsx:71
iconReactNode-components/Toolbar.tsx:60
idstring-components/Toolbar.tsx:58
labelstring-components/Toolbar.tsx:59
onToggle?(active) => voidCalled after the toggle flips; receives the new active state.components/Toolbar.tsx:70
shortcut?stringKeyboard shortcut hint — reserved for future custom tooltip.components/Toolbar.tsx:62
type"toggle"-components/Toolbar.tsx:57

TypedWorkspace ​

Defined in: api/index.tsx:67

A workspace created from definePanels: the same object, with openPanel typed from the registry. Pass it anywhere a Workspace goes. useWorkspace() stays untyped; keep this one for typed calls.

Extends ​

Type Parameters ​

Type ParameterDefault type
TPanels extends Record<string, PanelDefinition>-
TEvents extends objectRecord<string, unknown>

Methods ​

closeLeafGroup() ​
ts
closeLeafGroup(leafId, options?): Promise<void>;

Defined in: WorkspaceClient.ts:426

Closes a leaf group: each of its tabs is closed through the guarded close path, then the group is removed once empty. A tab whose close guard refuses — or a dirty tab that onConfirm doesn't approve — stays open, and so does its group. Resolves once every close request has been settled.

Parameters ​
ParameterType
leafIdstring
options?{ onConfirm?: (opts?) => Promise<boolean>; }
options.onConfirm?(opts?) => Promise<boolean>
Returns ​

Promise<void>

Inherited from ​

Workspace.closeLeafGroup

closePanel() ​
ts
closePanel(id): void;

Defined in: WorkspaceClient.ts:271

Parameters ​
ParameterType
idstring
Returns ​

void

Inherited from ​

Workspace.closePanel

dockPanel() ​
ts
dockPanel(...args): void;

Defined in: WorkspaceClient.ts:283

Parameters ​
ParameterType
...args[string, string]
Returns ​

void

Inherited from ​

Workspace.dockPanel

dockPanelToGroup() ​
ts
dockPanelToGroup(
   id, 
   targetLeafId, 
   position): void;

Defined in: WorkspaceClient.ts:411

Docks a panel into an existing leaf group at the given drop position.

Parameters ​
ParameterType
idstring
targetLeafIdstring
positionDropPosition
Returns ​

void

Inherited from ​

Workspace.dockPanelToGroup

dockPanelToWorkspaceEdge() ​
ts
dockPanelToWorkspaceEdge(id, position): void;

Defined in: WorkspaceClient.ts:478

Docks a panel to one of the workspace's outer edges.

Parameters ​
ParameterType
idstring
positionSplitDirection
Returns ​

void

Inherited from ​

Workspace.dockPanelToWorkspaceEdge

findPanelId() ​
ts
findPanelId(component, dedupeKey): string | null;

Defined in: WorkspaceClient.ts:387

Finds an already-open panel of the given component with a matching dedupeKey (set via openPanel's dedupeKey option). Returns null if none is open.

Parameters ​
ParameterType
componentstring
dedupeKeystring
Returns ​

string | null

Inherited from ​

Workspace.findPanelId

floatPanel() ​
ts
floatPanel(...args): void;

Defined in: WorkspaceClient.ts:279

Parameters ​
ParameterType
...args[string, { height: number; width: number; x: number; y: number; }, FloatAnchor | null]
Returns ​

void

Inherited from ​

Workspace.floatPanel

focusPanel() ​
Call Signature ​
ts
focusPanel(id): void;

Defined in: WorkspaceClient.ts:296

Activates the given panel regardless of its current state. For floating panels: raises z-index so the window appears on top. For docked panels: selects the tab within its leaf group. For minimized panels: makes it the active one, but leaves it minimized. For a panel in its own window (7.12.0): also brings that window forward, best effort.

Parameters ​
ParameterType
idstring
Returns ​

void

Inherited from ​

Workspace.focusPanel

Call Signature ​
ts
focusPanel(id, options): void;

Defined in: WorkspaceClient.ts:305

As focusPanel(id); with restore: true, a minimized panel is restored first, with restorePanel's events (7.11.0).

Parameters ​
ParameterType
idstring
options{ restore?: boolean; }
options.restore?boolean
Returns ​

void

Example ​
ts
workspace.focusPanel('map-1', { restore: true });   // bring the map forward, wherever it is
Inherited from ​

Workspace.focusPanel

focusPanelWindow() ​
ts
focusPanelWindow(id): {
  ok: boolean;
};

Defined in: WorkspaceClient.ts:323

Brings forward the window that holds a panel, and makes it the active panel (7.12.0): its pop-out for a panel in its own window (a widget's panel too), the main window for one in the page. Best effort: a browser may keep another window in front. ok is false for an id that isn't open.

Parameters ​
ParameterType
idstring
Returns ​
ts
{
  ok: boolean;
}
NameTypeDefined in
okbooleanWorkspaceClient.ts:323
Example ​
tsx
// From a widget in its own window: bring its owner panel's window forward.
workspace.focusPanelWindow(useWidget()!.ownerPanelId!);
Inherited from ​

Workspace.focusPanelWindow

getOpenPanelIds() ​
ts
getOpenPanelIds(): string[];

Defined in: WorkspaceClient.ts:383

Returns the IDs of all currently open panels.

Returns ​

string[]

Inherited from ​

Workspace.getOpenPanelIds

isOpen() ​
ts
isOpen(id): boolean;

Defined in: WorkspaceClient.ts:380

Returns true if a panel with this ID is currently open.

Parameters ​
ParameterType
idstring
Returns ​

boolean

Inherited from ​

Workspace.isOpen

loadLayout() ​
ts
loadLayout(json): boolean;

Defined in: WorkspaceClient.ts:393

Parameters ​
ParameterType
jsonstring
Returns ​

boolean

Inherited from ​

Workspace.loadLayout

maximizePanel() ​
ts
maximizePanel(id): void;

Defined in: WorkspaceClient.ts:287

Parameters ​
ParameterType
idstring
Returns ​

void

Inherited from ​

Workspace.maximizePanel

minimizePanel() ​
ts
minimizePanel(id): void;

Defined in: WorkspaceClient.ts:273

Parameters ​
ParameterType
idstring
Returns ​

void

Inherited from ​

Workspace.minimizePanel

movePanelOrder() ​
ts
movePanelOrder(
   panelId, 
   targetLeafId, 
   targetIndex): void;

Defined in: WorkspaceClient.ts:416

Reorders a panel's tab within its leaf group.

Parameters ​
ParameterType
panelIdstring
targetLeafIdstring
targetIndexnumber
Returns ​

void

Inherited from ​

Workspace.movePanelOrder

onLayoutChanged() ​
ts
onLayoutChanged(callback): () => void;

Defined in: WorkspaceClient.ts:534

Subscribe to the coalesced layout-change signal — see BuiltInEvents's 'layout:changed' doc for exactly what it covers (and doesn't).

Parameters ​
ParameterType
callback() => void
Returns ​

() => void

Inherited from ​

Workspace.onLayoutChanged

onPanelClose() ​
ts
onPanelClose(callback): () => void;

Defined in: WorkspaceClient.ts:512

Subscribe to panel close events.

Parameters ​
ParameterType
callback(id) => void
Returns ​

() => void

Inherited from ​

Workspace.onPanelClose

onPanelMinimize() ​
ts
onPanelMinimize(callback): () => void;

Defined in: WorkspaceClient.ts:519

Subscribe to panel minimize events.

Parameters ​
ParameterType
callback(id) => void
Returns ​

() => void

Inherited from ​

Workspace.onPanelMinimize

onPanelOpen() ​
ts
onPanelOpen(callback): () => void;

Defined in: WorkspaceClient.ts:504

Subscribe to panel open events. Fires only for newly created panels.

Parameters ​
ParameterType
callback(id, component) => void
Returns ​

() => void

Inherited from ​

Workspace.onPanelOpen

onPanelRestore() ​
ts
onPanelRestore(callback): () => void;

Defined in: WorkspaceClient.ts:526

Subscribe to panel restore events.

Parameters ​
ParameterType
callback(id) => void
Returns ​

() => void

Inherited from ​

Workspace.onPanelRestore

onPanelsExcluded() ​
ts
onPanelsExcluded(callback): () => void;

Defined in: WorkspaceClient.ts:541

Subscribe to notification that a saveLayout() call excluded one or more panels because their current props weren't serializable — see BuiltInEvents's 'layout:panels-excluded' doc.

Parameters ​
ParameterType
callback(panels) => void
Returns ​

() => void

Inherited from ​

Workspace.onPanelsExcluded

openPanel() ​
ts
openPanel<K>(
   id, 
   component, 
   options?): void;

Defined in: api/index.tsx:69

openPanel, typed: a registered name, and that panel's props.

Type Parameters ​
Type Parameter
K extends string
Parameters ​
ParameterType
idstring
componentK
options?OpenPanelOptions<PanelPropsOf<TPanels[K]>>
Returns ​

void

Overrides ​

Workspace.openPanel

popOutPanel() ​
ts
popOutPanel(id): PopOutResult;

Defined in: WorkspaceClient.ts:361

Moves a panel into its own browser window (7.12.0), for a second monitor. Nothing remounts: the panel's state, scroll offsets and a canvas's WebGL context go with it. A docked panel remembers its group and goes back into it on return.

Call it inside the user's click or key press: browsers only open a window then. A click in one of the app's pop-out windows counts too (7.12.1). It is synchronous, and says what happened (see PopOutResult); on a refusal the panel stays where it is and nothing is shown to the user, so the app decides what to say. Calling it for a panel that is already out brings its window forward.

Needs createWorkspace({ popOut: true }) and the panel type's defaultOptions.canPopOut. The window opens <DockableDesktopProvider popoutUrl>, or a blank window. When that page can't be used after all (another origin, or it doesn't load within 10 s), the panel comes back and the window closes, after this has returned { ok: true }.

On { ok: true }, panel:popping-out was sent during the call, with the panel still in the page; panel:popped-out follows once it is laid out in the window, or panel:returned when the window fails first.

Parameters ​
ParameterType
idstring
Returns ​

PopOutResult

Example ​
tsx
<button onClick={() => {
  const result = workspace.popOutPanel('chart-1');
  if (!result.ok && result.reason === 'blocked') alert('Allow pop-ups for this site.');
}}>Pop out</button>
Inherited from ​

Workspace.popOutPanel

publish() ​
ts
publish<K>(event, data): void;

Defined in: WorkspaceClient.ts:487

Type Parameters ​
Type Parameter
K extends string | number | symbol
Parameters ​
ParameterType
eventK
dataTEvents & BuiltInEvents[K]
Returns ​

void

Inherited from ​

Workspace.publish

registerCloseGuard() ​
ts
registerCloseGuard(id, guard): void;

Defined in: WorkspaceClient.ts:431

Registers a guard that can veto closing the given panel.

Parameters ​
ParameterType
idstring
guard() => boolean | Promise<boolean>
Returns ​

void

Inherited from ​

Workspace.registerCloseGuard

registerStateProvider() ​
ts
registerStateProvider(id, provider): void;

Defined in: WorkspaceClient.ts:441

Registers a callback reporting a panel's current restorable state, pulled fresh on every saveLayout() call — see BuiltInEvents's 'layout:panels-excluded' doc and FormContainerContract.registerStateProvider.

Parameters ​
ParameterType
idstring
provider() => unknown
Returns ​

void

Inherited from ​

Workspace.registerStateProvider

requestClosePanel() ​
ts
requestClosePanel(id, options?): Promise<void>;

Defined in: WorkspaceClient.ts:473

Requests that a panel close, honoring any registered close guard and its dirty flag: a dirty panel closes only if onConfirm resolves true (without onConfirm it stays open). force: true skips both. Resolves once the close (or the refusal) has been decided.

Parameters ​
ParameterType
idstring
options?{ force?: boolean; onConfirm?: (opts?) => Promise<boolean>; }
options.force?boolean
options.onConfirm?(opts?) => Promise<boolean>
Returns ​

Promise<void>

Inherited from ​

Workspace.requestClosePanel

restorePanel() ​
ts
restorePanel(...args): void;

Defined in: WorkspaceClient.ts:275

Parameters ​
ParameterType
...args[string, { focus?: boolean; }]
Returns ​

void

Inherited from ​

Workspace.restorePanel

returnPanel() ​
ts
returnPanel(id): {
  ok: boolean;
};

Defined in: WorkspaceClient.ts:377

Brings a panel back from its own window (7.12.0), where it was. A panel that was floating floats at its rect. One that was docked goes, in this order:

  • into the group of its tab-mates, among their tabs, when one of them is docked;
  • into its own group, when that group was kept and waits empty;
  • beside the panels it was next to, on the same side at the same size (the nearest part of its old layout still docked);
  • into the grid, when no panel is docked there;
  • otherwise floating, or into the first group for a type that can't float.

Panels out at the same time come back, in any order, to the layout they left. The window closes. Closing the window, or its "Return to desktop" button, does the same. ok is false when the panel wasn't in a window.

Parameters ​
ParameterType
idstring
Returns ​
ts
{
  ok: boolean;
}
NameTypeDefined in
okbooleanWorkspaceClient.ts:377
Inherited from ​

Workspace.returnPanel

saveLayout() ​
ts
saveLayout(): string;

Defined in: WorkspaceClient.ts:391

Returns ​

string

Inherited from ​

Workspace.saveLayout

setDirection() ​
ts
setDirection(dir): void;

Defined in: WorkspaceClient.ts:395

Parameters ​
ParameterType
dir"rtl" | "ltr"
Returns ​

void

Inherited from ​

Workspace.setDirection

setPanelDirty() ​
ts
setPanelDirty(
   id, 
   dirty, 
   options?): void;

Defined in: WorkspaceClient.ts:449

Sets/clears a panel's dirty (unsaved changes) flag.

Parameters ​
ParameterType
idstring
dirtyboolean
options?DirtyStateOptions
Returns ​

void

Inherited from ​

Workspace.setPanelDirty

setPanelIcon() ​
ts
setPanelIcon(id, icon): void;

Defined in: WorkspaceClient.ts:464

Sets an open panel's tab/window/taskbar icon; null restores its registration's icon. Not saved by saveLayout().

Parameters ​
ParameterType
idstring
iconReactNode
Returns ​

void

Inherited from ​

Workspace.setPanelIcon

showContextMenu() ​
ts
showContextMenu(options): void;

Defined in: WorkspaceClient.ts:483

Shows a context menu using the app's configured ContextMenuAdapter.

Parameters ​
ParameterType
optionsShowContextMenuOptions
Returns ​

void

Inherited from ​

Workspace.showContextMenu

subscribe() ​
ts
subscribe<K>(event, callback): () => void;

Defined in: WorkspaceClient.ts:494

Type Parameters ​
Type Parameter
K extends string | number | symbol
Parameters ​
ParameterType
eventK
callback(data) => void
Returns ​

() => void

Inherited from ​

Workspace.subscribe

unregisterCloseGuard() ​
ts
unregisterCloseGuard(id): void;

Defined in: WorkspaceClient.ts:436

Removes a previously registered close guard.

Parameters ​
ParameterType
idstring
Returns ​

void

Inherited from ​

Workspace.unregisterCloseGuard

unregisterStateProvider() ​
ts
unregisterStateProvider(id): void;

Defined in: WorkspaceClient.ts:446

Removes a previously registered state provider.

Parameters ​
ParameterType
idstring
Returns ​

void

Inherited from ​

Workspace.unregisterStateProvider

updateFloatingPosition() ​
ts
updateFloatingPosition(id, updates): void;

Defined in: WorkspaceClient.ts:403

Updates position/size/anchor of a floating panel.

Parameters ​
ParameterType
idstring
updatesPartial<Pick<FloatingWindow, "x" | "y" | "width" | "height" | "anchor">>
Returns ​

void

Inherited from ​

Workspace.updateFloatingPosition

updatePanelProps() ​
ts
updatePanelProps(...args): void;

Defined in: WorkspaceClient.ts:459

Replaces an open panel's props, or derives them from the current ones (7.11.0). See WorkspaceActions.updatePanelProps.

Parameters ​
ParameterType
...args[string, | Record<string, unknown> | ((prev) => Record<string, unknown>)]
Returns ​

void

Inherited from ​

Workspace.updatePanelProps

updatePanelTitle() ​
ts
updatePanelTitle(id, title): void;

Defined in: WorkspaceClient.ts:454

Updates a panel's displayed title.

Parameters ​
ParameterType
idstring
titlestring | MessageDescriptor | (() => string)
Returns ​

void

Inherited from ​

Workspace.updatePanelTitle

updateSplitSizes() ​
ts
updateSplitSizes(path, sizes): void;

Defined in: WorkspaceClient.ts:398

Updates the split-size fractions at the given grid path.

Parameters ​
ParameterType
pathnumber[]
sizesnumber[]
Returns ​

void

Inherited from ​

Workspace.updateSplitSizes

Properties ​

PropertyModifierTypeDescriptionInherited fromDefined in
configreadonlyPick<WorkspaceClientConfig, | "formatMessage" | "predefinedMessages" | "dir" | "defaultSplitRatio" | "defaultEdgeSplitRatio" | "zIndexBase">Non-rendering configuration forwarded to the provider.Workspace.configWorkspaceClient.ts:197
initialStatereadonlystring | nullSerialised layout to restore on mount, or null to start with an empty canvas.Workspace.initialStateWorkspaceClient.ts:194
registryreadonlyPanelRegistryScoped panel registry — fully independent from the global singleton.Workspace.registryWorkspaceClient.ts:191

WidgetHandle ​

Defined in: components/panelOverlay/widgetContext.ts:14

What useWidget() returns inside a managed widget's content (7.11.0).

usePanel() there is still the owner panel, so content bound to its owner (a table bound to its map) keeps working wherever the widget is. This is the widget's own side.

Methods ​

onMoved() ​
ts
onMoved(cb): () => void;

Defined in: components/panelOverlay/widgetContext.ts:42

Called once the element is in its new container and has its new size (or, with no size, as when minimised, on the next frames), after every move that called onWillMove. Restore what you saved in onWillMove here. Returns the unsubscribe function.

Parameters ​
ParameterType
cb() => void
Returns ​

() => void

onWillMove() ​
ts
onWillMove(cb): () => void;

Defined in: components/panelOverlay/widgetContext.ts:36

Called just before the widget's content element moves to another container: into or out of its panel, between docked, tabbed and floating, minimised or restored. Save what a move would disturb here, such as a map's view. Returns the unsubscribe function.

Parameters ​
ParameterType
cb() => void
Returns ​

() => void

Properties ​

PropertyTypeDescriptionDefined in
idstringThe widget's id, as given to useFloatingWidgets().open().components/panelOverlay/widgetContext.ts:16
isPoppedOutbooleanIt is in its own browser window (useFloatingWidgets().popOut, 7.12.0); location is then 'floating'. Its content's usePanelWindow() gives that window.components/panelOverlay/widgetContext.ts:30
locationWidgetLocationWhere it is shown now. A component that calls useWidget() re-renders when it changes.components/panelOverlay/widgetContext.ts:25
ownerPanelIdstring | nullThe workspace panel that owns it, or null when its overlay isn't in one.components/panelOverlay/widgetContext.ts:18
panelIdstring | nullThe id of the widget's own panel while it is out of its owner panel, for workspace calls such as updatePanelTitle; null while it is in the panel (7.11.0).components/panelOverlay/widgetContext.ts:23

WidgetMenuContext ​

Defined in: components/panelOverlay/types.ts:132

What ManagedWidget.titleMenu is given to build its items from (7.11.0).

Methods ​

close() ​
ts
close(): void;

Defined in: components/panelOverlay/types.ts:150

Closes the widget, wherever it is.

Returns ​

void

move() ​
ts
move(to): MoveResult;

Defined in: components/panelOverlay/types.ts:148

useFloatingWidgets().move() for this widget.

Parameters ​
ParameterType
toWidgetTarget
Returns ​

MoveResult

popOut() ​
ts
popOut(): PopOutResult;

Defined in: components/panelOverlay/types.ts:146

useFloatingWidgets().popOut() for this widget (7.12.0).

Returns ​

PopOutResult

Properties ​

PropertyTypeDescriptionDefined in
canDockbooleanIts config's canDock.components/panelOverlay/types.ts:138
canFloatbooleanIts config's canFloat.components/panelOverlay/types.ts:140
canPopOutbooleanIts config's canPopOut, on a workspace with popOut (7.12.0).components/panelOverlay/types.ts:142
idstringThe widget's id.components/panelOverlay/types.ts:134
isPoppedOutbooleanIt is in its own browser window now (location is then 'floating'). (7.12.0)components/panelOverlay/types.ts:144
locationWidgetLocationWhere it is now.components/panelOverlay/types.ts:136

Workspace ​

Defined in: api/index.tsx:36

A workspace: the layout, every action on it, the panel registry and the event bus. It is live from the moment it is created — calls made before any <DockableDesktopProvider> mounts apply immediately.

Extends ​

  • WorkspaceClient<TEvents>

Extended by ​

Type Parameters ​

Type ParameterDefault type
TEvents extends objectRecord<string, unknown>

Methods ​

closeLeafGroup() ​
ts
closeLeafGroup(leafId, options?): Promise<void>;

Defined in: WorkspaceClient.ts:426

Closes a leaf group: each of its tabs is closed through the guarded close path, then the group is removed once empty. A tab whose close guard refuses — or a dirty tab that onConfirm doesn't approve — stays open, and so does its group. Resolves once every close request has been settled.

Parameters ​
ParameterType
leafIdstring
options?{ onConfirm?: (opts?) => Promise<boolean>; }
options.onConfirm?(opts?) => Promise<boolean>
Returns ​

Promise<void>

Inherited from ​
ts
WorkspaceClient.closeLeafGroup
closePanel() ​
ts
closePanel(id): void;

Defined in: WorkspaceClient.ts:271

Parameters ​
ParameterType
idstring
Returns ​

void

Inherited from ​
ts
WorkspaceClient.closePanel
dockPanel() ​
ts
dockPanel(...args): void;

Defined in: WorkspaceClient.ts:283

Parameters ​
ParameterType
...args[string, string]
Returns ​

void

Inherited from ​
ts
WorkspaceClient.dockPanel
dockPanelToGroup() ​
ts
dockPanelToGroup(
   id, 
   targetLeafId, 
   position): void;

Defined in: WorkspaceClient.ts:411

Docks a panel into an existing leaf group at the given drop position.

Parameters ​
ParameterType
idstring
targetLeafIdstring
positionDropPosition
Returns ​

void

Inherited from ​
ts
WorkspaceClient.dockPanelToGroup
dockPanelToWorkspaceEdge() ​
ts
dockPanelToWorkspaceEdge(id, position): void;

Defined in: WorkspaceClient.ts:478

Docks a panel to one of the workspace's outer edges.

Parameters ​
ParameterType
idstring
positionSplitDirection
Returns ​

void

Inherited from ​
ts
WorkspaceClient.dockPanelToWorkspaceEdge
findPanelId() ​
ts
findPanelId(component, dedupeKey): string | null;

Defined in: WorkspaceClient.ts:387

Finds an already-open panel of the given component with a matching dedupeKey (set via openPanel's dedupeKey option). Returns null if none is open.

Parameters ​
ParameterType
componentstring
dedupeKeystring
Returns ​

string | null

Inherited from ​
ts
WorkspaceClient.findPanelId
floatPanel() ​
ts
floatPanel(...args): void;

Defined in: WorkspaceClient.ts:279

Parameters ​
ParameterType
...args[string, { height: number; width: number; x: number; y: number; }, FloatAnchor | null]
Returns ​

void

Inherited from ​
ts
WorkspaceClient.floatPanel
focusPanel() ​
Call Signature ​
ts
focusPanel(id): void;

Defined in: WorkspaceClient.ts:296

Activates the given panel regardless of its current state. For floating panels: raises z-index so the window appears on top. For docked panels: selects the tab within its leaf group. For minimized panels: makes it the active one, but leaves it minimized. For a panel in its own window (7.12.0): also brings that window forward, best effort.

Parameters ​
ParameterType
idstring
Returns ​

void

Inherited from ​
ts
WorkspaceClient.focusPanel
Call Signature ​
ts
focusPanel(id, options): void;

Defined in: WorkspaceClient.ts:305

As focusPanel(id); with restore: true, a minimized panel is restored first, with restorePanel's events (7.11.0).

Parameters ​
ParameterType
idstring
options{ restore?: boolean; }
options.restore?boolean
Returns ​

void

Example ​
ts
workspace.focusPanel('map-1', { restore: true });   // bring the map forward, wherever it is
Inherited from ​
ts
WorkspaceClient.focusPanel
focusPanelWindow() ​
ts
focusPanelWindow(id): {
  ok: boolean;
};

Defined in: WorkspaceClient.ts:323

Brings forward the window that holds a panel, and makes it the active panel (7.12.0): its pop-out for a panel in its own window (a widget's panel too), the main window for one in the page. Best effort: a browser may keep another window in front. ok is false for an id that isn't open.

Parameters ​
ParameterType
idstring
Returns ​
ts
{
  ok: boolean;
}
NameTypeDefined in
okbooleanWorkspaceClient.ts:323
Example ​
tsx
// From a widget in its own window: bring its owner panel's window forward.
workspace.focusPanelWindow(useWidget()!.ownerPanelId!);
Inherited from ​
ts
WorkspaceClient.focusPanelWindow
getOpenPanelIds() ​
ts
getOpenPanelIds(): string[];

Defined in: WorkspaceClient.ts:383

Returns the IDs of all currently open panels.

Returns ​

string[]

Inherited from ​
ts
WorkspaceClient.getOpenPanelIds
isOpen() ​
ts
isOpen(id): boolean;

Defined in: WorkspaceClient.ts:380

Returns true if a panel with this ID is currently open.

Parameters ​
ParameterType
idstring
Returns ​

boolean

Inherited from ​
ts
WorkspaceClient.isOpen
loadLayout() ​
ts
loadLayout(json): boolean;

Defined in: WorkspaceClient.ts:393

Parameters ​
ParameterType
jsonstring
Returns ​

boolean

Inherited from ​
ts
WorkspaceClient.loadLayout
maximizePanel() ​
ts
maximizePanel(id): void;

Defined in: WorkspaceClient.ts:287

Parameters ​
ParameterType
idstring
Returns ​

void

Inherited from ​
ts
WorkspaceClient.maximizePanel
minimizePanel() ​
ts
minimizePanel(id): void;

Defined in: WorkspaceClient.ts:273

Parameters ​
ParameterType
idstring
Returns ​

void

Inherited from ​
ts
WorkspaceClient.minimizePanel
movePanelOrder() ​
ts
movePanelOrder(
   panelId, 
   targetLeafId, 
   targetIndex): void;

Defined in: WorkspaceClient.ts:416

Reorders a panel's tab within its leaf group.

Parameters ​
ParameterType
panelIdstring
targetLeafIdstring
targetIndexnumber
Returns ​

void

Inherited from ​
ts
WorkspaceClient.movePanelOrder
onLayoutChanged() ​
ts
onLayoutChanged(callback): () => void;

Defined in: WorkspaceClient.ts:534

Subscribe to the coalesced layout-change signal — see BuiltInEvents's 'layout:changed' doc for exactly what it covers (and doesn't).

Parameters ​
ParameterType
callback() => void
Returns ​

() => void

Inherited from ​
ts
WorkspaceClient.onLayoutChanged
onPanelClose() ​
ts
onPanelClose(callback): () => void;

Defined in: WorkspaceClient.ts:512

Subscribe to panel close events.

Parameters ​
ParameterType
callback(id) => void
Returns ​

() => void

Inherited from ​
ts
WorkspaceClient.onPanelClose
onPanelMinimize() ​
ts
onPanelMinimize(callback): () => void;

Defined in: WorkspaceClient.ts:519

Subscribe to panel minimize events.

Parameters ​
ParameterType
callback(id) => void
Returns ​

() => void

Inherited from ​
ts
WorkspaceClient.onPanelMinimize
onPanelOpen() ​
ts
onPanelOpen(callback): () => void;

Defined in: WorkspaceClient.ts:504

Subscribe to panel open events. Fires only for newly created panels.

Parameters ​
ParameterType
callback(id, component) => void
Returns ​

() => void

Inherited from ​
ts
WorkspaceClient.onPanelOpen
onPanelRestore() ​
ts
onPanelRestore(callback): () => void;

Defined in: WorkspaceClient.ts:526

Subscribe to panel restore events.

Parameters ​
ParameterType
callback(id) => void
Returns ​

() => void

Inherited from ​
ts
WorkspaceClient.onPanelRestore
onPanelsExcluded() ​
ts
onPanelsExcluded(callback): () => void;

Defined in: WorkspaceClient.ts:541

Subscribe to notification that a saveLayout() call excluded one or more panels because their current props weren't serializable — see BuiltInEvents's 'layout:panels-excluded' doc.

Parameters ​
ParameterType
callback(panels) => void
Returns ​

() => void

Inherited from ​
ts
WorkspaceClient.onPanelsExcluded
openPanel() ​
ts
openPanel(...args): void;

Defined in: WorkspaceClient.ts:269

Parameters ​
ParameterType
...args[string, string, OpenPanelOptions<object>]
Returns ​

void

Inherited from ​
ts
WorkspaceClient.openPanel
popOutPanel() ​
ts
popOutPanel(id): PopOutResult;

Defined in: WorkspaceClient.ts:361

Moves a panel into its own browser window (7.12.0), for a second monitor. Nothing remounts: the panel's state, scroll offsets and a canvas's WebGL context go with it. A docked panel remembers its group and goes back into it on return.

Call it inside the user's click or key press: browsers only open a window then. A click in one of the app's pop-out windows counts too (7.12.1). It is synchronous, and says what happened (see PopOutResult); on a refusal the panel stays where it is and nothing is shown to the user, so the app decides what to say. Calling it for a panel that is already out brings its window forward.

Needs createWorkspace({ popOut: true }) and the panel type's defaultOptions.canPopOut. The window opens <DockableDesktopProvider popoutUrl>, or a blank window. When that page can't be used after all (another origin, or it doesn't load within 10 s), the panel comes back and the window closes, after this has returned { ok: true }.

On { ok: true }, panel:popping-out was sent during the call, with the panel still in the page; panel:popped-out follows once it is laid out in the window, or panel:returned when the window fails first.

Parameters ​
ParameterType
idstring
Returns ​

PopOutResult

Example ​
tsx
<button onClick={() => {
  const result = workspace.popOutPanel('chart-1');
  if (!result.ok && result.reason === 'blocked') alert('Allow pop-ups for this site.');
}}>Pop out</button>
Inherited from ​
ts
WorkspaceClient.popOutPanel
publish() ​
ts
publish<K>(event, data): void;

Defined in: WorkspaceClient.ts:487

Type Parameters ​
Type Parameter
K extends string | number | symbol
Parameters ​
ParameterType
eventK
dataTEvents & BuiltInEvents[K]
Returns ​

void

Inherited from ​
ts
WorkspaceClient.publish
registerCloseGuard() ​
ts
registerCloseGuard(id, guard): void;

Defined in: WorkspaceClient.ts:431

Registers a guard that can veto closing the given panel.

Parameters ​
ParameterType
idstring
guard() => boolean | Promise<boolean>
Returns ​

void

Inherited from ​
ts
WorkspaceClient.registerCloseGuard
registerStateProvider() ​
ts
registerStateProvider(id, provider): void;

Defined in: WorkspaceClient.ts:441

Registers a callback reporting a panel's current restorable state, pulled fresh on every saveLayout() call — see BuiltInEvents's 'layout:panels-excluded' doc and FormContainerContract.registerStateProvider.

Parameters ​
ParameterType
idstring
provider() => unknown
Returns ​

void

Inherited from ​
ts
WorkspaceClient.registerStateProvider
requestClosePanel() ​
ts
requestClosePanel(id, options?): Promise<void>;

Defined in: WorkspaceClient.ts:473

Requests that a panel close, honoring any registered close guard and its dirty flag: a dirty panel closes only if onConfirm resolves true (without onConfirm it stays open). force: true skips both. Resolves once the close (or the refusal) has been decided.

Parameters ​
ParameterType
idstring
options?{ force?: boolean; onConfirm?: (opts?) => Promise<boolean>; }
options.force?boolean
options.onConfirm?(opts?) => Promise<boolean>
Returns ​

Promise<void>

Inherited from ​
ts
WorkspaceClient.requestClosePanel
restorePanel() ​
ts
restorePanel(...args): void;

Defined in: WorkspaceClient.ts:275

Parameters ​
ParameterType
...args[string, { focus?: boolean; }]
Returns ​

void

Inherited from ​
ts
WorkspaceClient.restorePanel
returnPanel() ​
ts
returnPanel(id): {
  ok: boolean;
};

Defined in: WorkspaceClient.ts:377

Brings a panel back from its own window (7.12.0), where it was. A panel that was floating floats at its rect. One that was docked goes, in this order:

  • into the group of its tab-mates, among their tabs, when one of them is docked;
  • into its own group, when that group was kept and waits empty;
  • beside the panels it was next to, on the same side at the same size (the nearest part of its old layout still docked);
  • into the grid, when no panel is docked there;
  • otherwise floating, or into the first group for a type that can't float.

Panels out at the same time come back, in any order, to the layout they left. The window closes. Closing the window, or its "Return to desktop" button, does the same. ok is false when the panel wasn't in a window.

Parameters ​
ParameterType
idstring
Returns ​
ts
{
  ok: boolean;
}
NameTypeDefined in
okbooleanWorkspaceClient.ts:377
Inherited from ​
ts
WorkspaceClient.returnPanel
saveLayout() ​
ts
saveLayout(): string;

Defined in: WorkspaceClient.ts:391

Returns ​

string

Inherited from ​
ts
WorkspaceClient.saveLayout
setDirection() ​
ts
setDirection(dir): void;

Defined in: WorkspaceClient.ts:395

Parameters ​
ParameterType
dir"rtl" | "ltr"
Returns ​

void

Inherited from ​
ts
WorkspaceClient.setDirection
setPanelDirty() ​
ts
setPanelDirty(
   id, 
   dirty, 
   options?): void;

Defined in: WorkspaceClient.ts:449

Sets/clears a panel's dirty (unsaved changes) flag.

Parameters ​
ParameterType
idstring
dirtyboolean
options?DirtyStateOptions
Returns ​

void

Inherited from ​
ts
WorkspaceClient.setPanelDirty
setPanelIcon() ​
ts
setPanelIcon(id, icon): void;

Defined in: WorkspaceClient.ts:464

Sets an open panel's tab/window/taskbar icon; null restores its registration's icon. Not saved by saveLayout().

Parameters ​
ParameterType
idstring
iconReactNode
Returns ​

void

Inherited from ​
ts
WorkspaceClient.setPanelIcon
showContextMenu() ​
ts
showContextMenu(options): void;

Defined in: WorkspaceClient.ts:483

Shows a context menu using the app's configured ContextMenuAdapter.

Parameters ​
ParameterType
optionsShowContextMenuOptions
Returns ​

void

Inherited from ​
ts
WorkspaceClient.showContextMenu
subscribe() ​
ts
subscribe<K>(event, callback): () => void;

Defined in: WorkspaceClient.ts:494

Type Parameters ​
Type Parameter
K extends string | number | symbol
Parameters ​
ParameterType
eventK
callback(data) => void
Returns ​

() => void

Inherited from ​
ts
WorkspaceClient.subscribe
unregisterCloseGuard() ​
ts
unregisterCloseGuard(id): void;

Defined in: WorkspaceClient.ts:436

Removes a previously registered close guard.

Parameters ​
ParameterType
idstring
Returns ​

void

Inherited from ​
ts
WorkspaceClient.unregisterCloseGuard
unregisterStateProvider() ​
ts
unregisterStateProvider(id): void;

Defined in: WorkspaceClient.ts:446

Removes a previously registered state provider.

Parameters ​
ParameterType
idstring
Returns ​

void

Inherited from ​
ts
WorkspaceClient.unregisterStateProvider
updateFloatingPosition() ​
ts
updateFloatingPosition(id, updates): void;

Defined in: WorkspaceClient.ts:403

Updates position/size/anchor of a floating panel.

Parameters ​
ParameterType
idstring
updatesPartial<Pick<FloatingWindow, "x" | "y" | "width" | "height" | "anchor">>
Returns ​

void

Inherited from ​
ts
WorkspaceClient.updateFloatingPosition
updatePanelProps() ​
ts
updatePanelProps(...args): void;

Defined in: WorkspaceClient.ts:459

Replaces an open panel's props, or derives them from the current ones (7.11.0). See WorkspaceActions.updatePanelProps.

Parameters ​
ParameterType
...args[string, | Record<string, unknown> | ((prev) => Record<string, unknown>)]
Returns ​

void

Inherited from ​
ts
WorkspaceClient.updatePanelProps
updatePanelTitle() ​
ts
updatePanelTitle(id, title): void;

Defined in: WorkspaceClient.ts:454

Updates a panel's displayed title.

Parameters ​
ParameterType
idstring
titlestring | MessageDescriptor | (() => string)
Returns ​

void

Inherited from ​
ts
WorkspaceClient.updatePanelTitle
updateSplitSizes() ​
ts
updateSplitSizes(path, sizes): void;

Defined in: WorkspaceClient.ts:398

Updates the split-size fractions at the given grid path.

Parameters ​
ParameterType
pathnumber[]
sizesnumber[]
Returns ​

void

Inherited from ​
ts
WorkspaceClient.updateSplitSizes

Properties ​

PropertyModifierTypeDescriptionInherited fromDefined in
configreadonlyPick<WorkspaceClientConfig, | "formatMessage" | "predefinedMessages" | "dir" | "defaultSplitRatio" | "defaultEdgeSplitRatio" | "zIndexBase">Non-rendering configuration forwarded to the provider.WorkspaceClient.configWorkspaceClient.ts:197
initialStatereadonlystring | nullSerialised layout to restore on mount, or null to start with an empty canvas.WorkspaceClient.initialStateWorkspaceClient.ts:194
registryreadonlyPanelRegistryScoped panel registry — fully independent from the global singleton.WorkspaceClient.registryWorkspaceClient.ts:191

WorkspaceActions ​

Defined in: types.ts:333

Every layout action, the event bus, and layout serialization — the methods of a workspace.

Call them on the workspace from useWorkspace() inside a component, or on the object createWorkspace() returned, from anywhere.

Example ​

tsx
function OpenMapButton() {
  const { openPanel } = useWorkspace();
  return <button onClick={() => openPanel('map-1', 'map')}>Open Map</button>;
}

Properties ​

PropertyTypeDescriptionDefined in
closeLeafGroup(leafId, options?) => Promise<void>Closes a leaf group: each of its panels is closed through the guarded close path (as if by its own tab ×), then the group is removed once empty. A close guard that refuses, or a dirty panel that onConfirm doesn't approve, keeps that panel — and therefore the group. A group with canClose: false is left alone.types.ts:527
closePanel(id) => voidCloses a panel immediately, bypassing dirty-state close guards. For guarded close, use WorkspaceActions.requestClosePanel.types.ts:368
dockPanel(id, targetLeafId?) => voidReturns a floating window to a docked grid tab group.types.ts:395
dockPanelToGroup(id, targetLeafId, position) => voidSplits an existing leaf group and docks a panel to the given side.types.ts:510
dockPanelToWorkspaceEdge(id, position) => voidDocks a floating panel to a workspace edge, creating a full-width or full-height column/row.types.ts:606
findPanelId(component, dedupeKey) => string | nullFinds the ID of an already-open panel of the given component with a matching dedupeKey (set via openPanel's dedupeKey option). Uses a synchronous stateRef read — safe to call outside of render.types.ts:458
floatPanel(id, rect?, anchor?) => voidDetaches a docked panel, converting it to a resizable floating window.types.ts:389
focusPanel(id) => voidActivates the given panel regardless of its current state. - Floating panel: raises z-index so the window appears on top of others. - Docked panel: selects the tab within its leaf group. - Minimized panel: makes it the active one but leaves it minimized. To restore it as well, call focusPanel(id, { restore: true }) on the workspace (useWorkspace(), 7.11.0). Example // Ensure a panel is visible before updating its content: if (actions.isOpen('map-1')) actions.focusPanel('map-1');types.ts:428
getOpenPanelIds() => string[]Returns the IDs of all currently open panels (docked, floating, and minimized). Uses a synchronous stateRef read — safe to call outside of render.types.ts:449
isOpen(id) => booleanReturns true if a panel with the given ID is currently open (docked, floating, or minimized). Uses a synchronous stateRef read — safe to call outside of render. Example if (!actions.isOpen('map-1')) { actions.openPanel('map-1', 'map'); } else { actions.focusPanel('map-1'); }types.ts:443
loadLayout(layoutJson) => booleanRestores a previously serialized workspace from a JSON string. Replaces the entire current layout — all panels not in the snapshot are closed. state.activePanelId is resolved from the snapshot's own activePanelId when that panel is still visible in it, and otherwise from the first leaf's selected tab (which is also the path layouts saved before that field existed take). It is never seeded from an arbitrary entry in panels.types.ts:482
maximizePanel(id) => voidMaximizes a floating window to cover the entire workspace viewport.types.ts:402
minimizePanel(id) => voidMinimizes a panel to the bottom taskbar dock, preserving its layout position.types.ts:373
movePanelOrder(panelId, targetLeafId, targetIndex) => voidReorders a panel's tab index within a docked leaf group.types.ts:517
openPanel<P>(id, component, options?) => voidOpens a registered panel into the workspace. If the panel ID is already open, the panel is focused instead of duplicated. Becomes state.activePanelId by default — pass options.focus: false to open without stealing focus from whatever is currently active. Default true Example // Open floating and pin to the top-right corner: actions.openPanel('layers', 'layertree', { initialTarget: 'floating', anchor: 'top-right' }); // Open in the background without stealing focus: actions.openPanel('prefetch', 'report', { focus: false }); // Open with per-instance data, deduped by document path: actions.openPanel(crypto.randomUUID(), 'document', { props: { path: '/notes/todo.md' }, dedupeKey: '/notes/todo.md', });types.ts:362
publish(event, data) => voidPublishes an event to the inter-panel pub/sub event bus.types.ts:489
registerCloseGuard(id, guard) => voidRegisters a close guard that can intercept and cancel panel close requests.types.ts:533
registerStateProvider(id, provider) => voidRegisters a callback reporting a docked/floating panel's current restorable state, pulled fresh every saveLayout() call — for panels whose props alone can't capture state they accumulate after opening (scroll position, an in-progress edit, a view-mode toggle). A panel that registers nothing keeps its static open-time props (or none). The returned value goes through the same isSerializable check as static props, re-evaluated on every save — a provider-backed panel's serializability can flip over its lifetime.types.ts:550
requestClosePanel(id, options?) => Promise<void>Closes a panel the way its tab's × does: registered close guards run first, and a dirty panel closes only if onConfirm resolves true — without onConfirm, a dirty panel stays open. (The tab's own ×, which passes an onConfirm, is what shows the built-in unsaved-changes dialog.)types.ts:600
restorePanel(id, options?) => voidRestores a minimized panel back to its last docked or floating position. Default truetypes.ts:379
saveLayout() => stringSerializes the entire workspace state to a JSON string. Includes grid layout, floating window positions, minimized panels, panel metadata, and the globally active panel (see SerializedLayout.activePanelId). Example localStorage.setItem('layout', actions.saveLayout());types.ts:469
setDirection(dir) => voidOverrides the workspace layout direction.types.ts:611
setPanelDirty(id, dirty, options?) => voidMarks a panel as dirty (has unsaved changes). Dirty panels show a visual indicator and the built-in close guard prompts the user before closing.types.ts:563
setPanelIcon(id, icon) => voidSets the icon shown on an open panel's tab, floating title bar and taskbar button, in place of its registration's defaultOptions.icon. null restores the registration's icon. The icon lives only in memory: saveLayout() never writes it.types.ts:590
showContextMenu(options) => voidImperatively shows the workspace context menu at the given position. Uses the workspace's context menu (the contextMenuAdapter given to <DockableDesktopProvider>, or an enclosing <RddContextMenu>).types.ts:617
subscribe(event, callback) => () => voidSubscribes a callback to the inter-panel pub/sub event bus. Example useEffect(() => actions.subscribe('map:zoom', ({ level }) => setZoom(level)), []);types.ts:501
unregisterCloseGuard(id) => voidRemoves a previously registered close guard.types.ts:538
unregisterStateProvider(id) => voidRemoves a previously registered state provider.types.ts:555
updateFloatingPosition(id, updates) => voidUpdates the position or size of a floating window.types.ts:414
updatePanelProps(id, props) => voidReplaces the props an open panel was opened with (7.11.0), or derives them from the current ones. The panel re-renders with them, serializable is re-checked (see PanelInfo.serializable), and layout:changed is published. Does nothing for a panel that isn't open, or for a managed widget's own panel (it has no props of its own). Example workspace.updatePanelProps('section-1', prev => ({ ...prev, line: newLine }));types.ts:582
updatePanelTitle(id, title) => voidUpdates the display title of an open panel.types.ts:569
updateSplitSizes(path, sizes) => voidResizes the flex split proportions of a branch node's children.types.ts:408

WorkspaceConfig ​

Defined in: api/index.tsx:25

Configuration for createWorkspace().

Extends ​

  • Omit<WorkspaceClientConfig, "predefinedMessages">

Properties ​

PropertyTypeDescriptionInherited fromDefined in
canDrop?(drop) => booleanVeto where users can move panels (7.9.0). Called for each place a dragged panel could go, and for the built-in "Float" and "Maximize" menu items: return false and that target isn't offered (its drop zone doesn't appear) and the move doesn't happen. It runs after the panel type's own canFloat / canDock, and only for what the user does: the app's own calls (floatPanel, dockPanelToGroup, openPanel) always work. Keep it fast and pure; it runs while the pointer moves. Example createWorkspace({ panels, // Nothing but tool panels in the left group. canDrop: ({ component, to }) => !(to.kind === 'group' && to.leafId === 'tools' && component !== 'tool'), });Omit.canDropWorkspaceClient.ts:139
defaultEdgeSplitRatio?numberFraction of the workspace the new panel takes when dropped on the workspace outer edge. Range 0.1–0.9. Default: 0.2.Omit.defaultEdgeSplitRatioWorkspaceClient.ts:114
defaultSplitRatio?numberFraction of the target panel the new panel takes when dropped on a panel's top/bottom/left/right cross target. Range 0.1–0.9. Default: 0.5.Omit.defaultSplitRatioWorkspaceClient.ts:109
dir?"rtl" | "ltr"Initial layout direction.Omit.dirWorkspaceClient.ts:104
formatMessage?MessageFormatterCustom i18n formatter for all internal strings.Omit.formatMessageWorkspaceClient.ts:100
initialState?string | nullSerialised layout produced by a previous saveLayout() call. Pass null or omit to start with an empty canvas. Parsed synchronously before the first render. The restored activePanelId is the one the snapshot recorded, or — for layouts saved before that was persisted — the selected tab of the first leaf in the grid.Omit.initialStateWorkspaceClient.ts:98
messages?Record<string, MessageDescriptor>Overrides any subset of the built-in message table.-api/index.tsx:27
panels?Record<string, PanelDefinition>Declarative panel catalog. Replaces imperative globalPanelRegistry.register() calls. Keys are the component identifiers used in openPanel() and serialised layouts.Omit.panelsWorkspaceClient.ts:89
popOut?booleanLets panels move into their own browser window, for a second monitor (7.12.0): a panel type opts in with defaultOptions.canPopOut, and the user opens it with "Open in new window" or the app with workspace.popOutPanel(id). Set once, here. With false, nothing of it runs: no menu item, and popOutPanel returns { ok: false, reason: 'disabled' }. Default false Example const workspace = createWorkspace({ popOut: true, panels: { chart: { component: ChartPanel, defaultOptions: { canPopOut: true } } }, });Omit.popOutWorkspaceClient.ts:154
zIndexBase?numberStarting z-index for floating windows and the library's own chrome overlays (context menu, toolbar flyout, modal stack, toast, workspace edge zones), all of which shift together via --rdd-z-base. Set this above/below a host app's own modal z-index range to control stacking against it. Default: 1000.Omit.zIndexBaseWorkspaceClient.ts:121

WorkspaceState ​

Defined in: types.ts:288

Global window manager state tree representing grid nodes, windows, and panels.

Properties ​

PropertyTypeDescriptionDefined in
activePanelIdstring | nullThe ID of the active/focused panel — the one contributions are read from (see useActiveContribution) and the one drawn with focused chrome. Always a panel the user can actually see: the selected tab of its leaf, or a floating window. Never a minimized panel, except when an app explicitly calls focusPanel() on one. Restored layouts resolve it from the saved snapshot's own activePanelId, falling back to the first leaf's selected tab — never to an arbitrary entry in panels.types.ts:308
dir"rtl" | "ltr"Current layout direction ('ltr' or 'rtl')types.ts:310
draggedPanelIdstring | nullThe ID of the panel tab currently being dragged.types.ts:298
edgeSplitRationumberSplit ratio for workspace outer-edge drops (0.1–0.9). Default 0.2.types.ts:316
floatingFloatingWindow[]Array of active floated windows.types.ts:292
gridRootLayoutNodeRoot branch node representing the grid.types.ts:290
isRtlbooleanConvenient boolean flag indicating RTL directiontypes.ts:312
minimized{ component: string; id: string; title: string | MessageDescriptor | (() => string); }[]Array of minimized panels waiting in the taskbar dock.types.ts:294
panelsRecord<string, PanelInfo>Map indexing panel metadata descriptors.types.ts:296
splitRationumberSplit ratio for panel cross-target drops (0.1–0.9). Default 0.5.types.ts:314

Type Aliases ​

ButtonVariant ​

ts
type ButtonVariant = "ghost" | "soft" | "outlined" | "filled";

Defined in: components/panelOverlay/PanelToolbar.tsx:16

Visual style applied to ToolbarButton and ToolbarToggle components.


ContainerType ​

ts
type ContainerType = 
  | "left-panel"
  | "right-panel"
  | "modal"
  | "dockable-panel"
  | "floating-window"
  | "standalone";

Defined in: components/FormContainerContext.ts:14

Represents the type of container context a panel/form is currently rendered inside.


ContextMenuItem ​

ts
type ContextMenuItem = 
  | ContextMenuSimpleItem
  | ContextMenuSeparator
  | ContextMenuSubMenu;

Defined in: components/ContextMenu.tsx:54


ContextMenuLabel ​

ts
type ContextMenuLabel = string | MessageDescriptor;

Defined in: components/contextMenuTypes.ts:8


DropPosition ​

ts
type DropPosition = SplitDirection | "center";

Defined in: types.ts:36

All possible drop positions — cardinal directions plus center (same group).


FloatAnchor ​

ts
type FloatAnchor = "top-left" | "top-right" | "bottom-left" | "bottom-right";

Defined in: types.ts:129

Corner of the workspace a floating window can be pinned to.

When anchor is set on a FloatingWindow, the window is positioned relative to that corner using CSS right/left + top/bottom and stacks with other windows sharing the same anchor (8 px gap, uncapped). Dragging a window away from its corner clears the anchor and returns it to free-float mode. The value is RTL-aware — 'top-left' always means the logical start corner regardless of document direction.


LayoutNode ​

ts
type LayoutNode = LayoutGridNode | LayoutLeafNode;

Defined in: types.ts:117

Union type representing either a branch or a leaf node in the layout grid.


ts
type MenuItemAction = () => void;

Defined in: components/contextMenuTypes.ts:9

Returns ​

void


MessageFormatter ​

ts
type MessageFormatter = (msg) => string;

Defined in: types.ts:27

Function type interface responsible for resolving localizable messages to flat strings.

Parameters ​

ParameterType
msgMessageDescriptor

Returns ​

string


MessageKey ​

ts
type MessageKey = keyof typeof defaultMessages;

Defined in: components/predefinedMessages.ts:74

Union of every key in defaultMessages.

Import this type in your i18n message tables to get a compile-time guarantee that all keys are present and no typos exist:

import type { MessageKey } from 'react-dockable-desktop';

const myMessages: Record<MessageKey, string> = { ... };


MoveResult ​

ts
type MoveResult = 
  | {
  ok: true;
}
  | {
  ok: false;
  reason:   | "not-open"
     | "owner-not-docked"
     | "owner-not-kept-alive"
     | "no-workspace";
};

Defined in: components/panelOverlay/types.ts:183

What move() did (7.11.0). A refusal changes nothing:

  • not-open: no widget with that id is open in this overlay;
  • owner-not-docked: 'docked' and 'tabbed' need the owner panel in the grid (a floating or minimised owner can still move a widget to 'floating');
  • owner-not-kept-alive: the owner's panel type has keepAlive: false, so it unmounts while hidden and would take the widget with it;
  • no-workspace: the overlay isn't in a workspace panel (no DockableDesktopProvider, or a modal or drawer), so there is nowhere to move to.

OverlayId ​

ts
type OverlayId = string;

Defined in: components/PanelProviderContext.tsx:10

Unique string identifier for panel/modal instances.


PanelDropTarget ​

ts
type PanelDropTarget = 
  | {
  kind: "group";
  leafId: string;
  position: DropPosition;
}
  | {
  kind: "edge";
  side: SplitDirection;
}
  | {
  anchor: FloatAnchor | null;
  kind: "float";
};

Defined in: types.ts:52

Where a user is about to move a panel, as canDrop sees it (7.9.0). Positions are the ones the move applies: under RTL, a drop on the zone drawn on the screen's right is 'left'.

  • group: into a group, on one side (a new split) or 'center' (as a tab, also between tabs);
  • edge: along a workspace edge, as a full-width or full-height strip;
  • float: into a floating window, pinned to a corner, or free (anchor: null, a tab dropped on nothing).

PanelMap ​

ts
type PanelMap<TPanels> = TPanels & {
  [panelsBrand]: true;
};

Defined in: api/index.tsx:42

A panel map marked by definePanels, so createWorkspace types openPanel from it (7.10.0).

Type Declaration ​

NameTypeDefined in
[panelsBrand]trueapi/index.tsx:42

Type Parameters ​

Type ParameterDefault type
TPanels extends Record<string, PanelDefinition>Record<string, PanelDefinition>

PanelPropsOf ​

ts
type PanelPropsOf<TDefinition> = TDefinition extends {
  component: React.ComponentType<infer P>;
} ? Omit<P, "panelId"> : never;

Defined in: api/index.tsx:45

The props openPanel passes to a registered panel: its component's props, without panelId.

Type Parameters ​

Type Parameter
TDefinition

PanelState ​

ts
type PanelState = PanelInfo["state"];

Defined in: api/index.tsx:109

The state of a workspace panel: where it is.


PanelTitle ​

ts
type PanelTitle = 
  | string
  | PanelTitleDescriptor
  | (() => string);

Defined in: components/PanelProviderContext.tsx:30

A panel, window, drawer or modal title: a plain string, a localizable descriptor, or (7.4.0) a function returning the text — called each time the title is rendered, so a title built with the app's own translation function follows a language change. A function title is not saved in a layout: a restored panel takes its registered default title.


PopOutResult ​

ts
type PopOutResult = 
  | {
  ok: true;
}
  | {
  ok: false;
  reason:   | "disabled"
     | "not-open"
     | "not-allowed"
     | "no-gesture"
     | "blocked"
     | "no-window";
};

Defined in: types.ts:226

What workspace.popOutPanel(id) did (7.12.0): { ok: true } when its window opened (or was already open; the panel moves in at once, or once popoutUrl has loaded), otherwise why not, checked in this order:

  • 'disabled': the workspace was created without popOut: true;
  • 'not-open': no open panel has this id;
  • 'not-allowed': the panel's type has no canPopOut (for a widget's panel, the widget's rules decide);
  • (a panel already out stops here: its window comes forward, { ok: true });
  • 'no-gesture': the call did not come from a user's activation (a click or key press, or soon after one), so no window may open;
  • 'no-window': no <DockableDesktopProvider> is mounted to show it;
  • 'blocked': the browser's pop-up blocker refused the window;
  • 'no-window': the window closed or could not be used before the panel moved in;
  • 'not-allowed': a widget that could not leave its panel after all (its window closes again).

The panel stays where it was on every refusal.


RddContextMenuProps ​

ts
type RddContextMenuProps = ContextMenuProps & {
  adapter?: ContextMenuAdapter;
  children?: React.ReactNode;
};

Defined in: api/index.tsx:381

Props for RddContextMenu.

Type Declaration ​

NameTypeDescriptionDefined in
adapter?ContextMenuAdapterWith children: the context-menu implementation for them. Default the built-in menuapi/index.tsx:383
children?React.ReactNodeWith children, RddContextMenu provides a context menu to them (useContextMenu() inside shows it) — for a surface outside <DockableDesktopProvider>, or to override the menu for a subtree. Without children, it is a single menu you drive through its ref.api/index.tsx:389

RddSecondarySidebarProps ​

ts
type RddSecondarySidebarProps = Omit<RddSidebarProps, "position" | "isSecondary">;

Defined in: components/Sidebar.tsx:783

Props for RddSecondarySidebar — identical to RddSidebarProps except position (always the opposite of whatever primary Sidebar it's nested inside) and isSecondary (always true) are not settable.


ResizeDir ​

ts
type ResizeDir = "n" | "ne" | "e" | "se" | "s" | "sw" | "w" | "nw";

Defined in: components/dragResize.ts:80


SidebarHeaderAction ​

ts
type SidebarHeaderAction = 
  | SidebarActionButton
  | SidebarCustomEntry;

Defined in: components/Sidebar.tsx:99

A single, non-toggling action button shown above the tab strip (e.g. a hamburger menu). Unlike SidebarTab, it never affects activeTabId or the drawer — the library only renders it and forwards the click; what happens next (opening a side panel, a modal, anything else) is entirely up to the consumer.


SidebarRailEntry ​

ts
type SidebarRailEntry = 
  | SidebarTab
  | SidebarActionButton
  | SidebarCustomEntry;

Defined in: components/Sidebar.tsx:107

A single entry inside RddSidebarProps.headerAction/footerAction when used as an array: either a non-toggling action button/custom render (see SidebarHeaderAction), or a real SidebarTab that behaves exactly like a main-list tab — it mounts, activates, and closes through the same lifecycle, so e.g. a "Settings" entry pinned to the footer can expand like any other tab.


SplitDirection ​

ts
type SplitDirection = "left" | "right" | "top" | "bottom";

Defined in: types.ts:33

The four cardinal directions a panel can be docked relative to another.


SplitOrientation ​

ts
type SplitOrientation = "horizontal" | "vertical";

Defined in: types.ts:30

Orientation modifier indicating split directions.


Stretch ​

ts
type Stretch = "width" | "height" | "both";

Defined in: components/panelOverlay/types.ts:29

Which of a docked widget's axes span the host panel instead of carrying a fixed size.

A docked widget normally pins one end of each axis and carries an explicit size. A stretched axis pins both ends and carries no size at all, so the widget tracks the panel as it resizes — with no ResizeObserver and no JS, because CSS already does exactly this.

  • 'width' — spans the panel's inline axis; height still fixed. A status or timeline strip.
  • 'height' — spans the block axis; width still fixed. A full-height side column.
  • 'both' — fills the panel, the inner-widget equivalent of maximizing a floating window.

TaskbarVisibility ​

ts
type TaskbarVisibility = "always" | "compact" | "autohide";

Defined in: components/WindowManager.tsx:49

Controls when the minimized-panel taskbar is visible.


ToastPosition ​

ts
type ToastPosition = "top-left" | "top-right" | "bottom-left" | "bottom-right";

Defined in: components/Toast.tsx:16

Corner position of the <RddToasts> relative to the viewport.


ToastType ​

ts
type ToastType = "info" | "success" | "warning" | "error";

Defined in: components/Toast.tsx:13

Visual type of a toast notification. Determines the icon and accent color.


ToolbarGroupEntry ​

ts
type ToolbarGroupEntry = 
  | ToolbarGroupSubItem
  | {
  type: "separator";
};

Defined in: components/Toolbar.tsx:100

An entry inside a group flyout — either a sub-item or a separator.


ToolbarItem ​

ts
type ToolbarItem = 
  | ToolbarActionItem
  | ToolbarRadioItem
  | ToolbarToggleItem
  | ToolbarGroupItem
  | ToolbarSeparator;

Defined in: components/Toolbar.tsx:136


ToolbarPosition ​

ts
type ToolbarPosition = "top" | "bottom" | "left" | "right";

Defined in: components/panelOverlay/types.ts:16

Edge of a panel to which a PanelToolbar attaches.


ToolbarVariant ​

ts
type ToolbarVariant = "transparent" | "frosted" | "solid";

Defined in: components/panelOverlay/PanelToolbar.tsx:13

Background style of a PanelToolbar.


WidgetLocation ​

ts
type WidgetLocation = "panel" | "docked" | "tabbed" | "floating" | "minimized";

Defined in: components/panelOverlay/types.ts:158

Where a managed widget is shown (7.11.0). 'panel' is inside its owner panel, as a floating widget; the others are a workspace panel of its own, beside its owner ('docked'), a tab in its owner's group ('tabbed'), a floating window ('floating'), or minimised to the taskbar.


WidgetPlacement ​

ts
type WidgetPlacement = {
  v: 1;
} & Record<string, unknown>;

Defined in: components/panelOverlay/types.ts:129

Where a managed widget is, as plain JSON (7.11.0): from useFloatingWidgets().placement(id), back to open(id, { placement }). Opaque: store it as it is (JSON-serialisable) and don't read its fields; they may change between versions, and v says which. The same in the Vue and Angular editions (vue-dockable-desktop, angular-dockable-desktop).

Type Declaration ​

NameTypeDefined in
v1components/panelOverlay/types.ts:129

WidgetTarget ​

ts
type WidgetTarget = 
  | {
  to: "panel";
}
  | {
  position: "left" | "right" | "top" | "bottom";
  size?: number;
  to: "docked";
}
  | {
  to: "tabbed";
}
  | {
  rect?: {
     height: number;
     width: number;
     x: number;
     y: number;
  };
  to: "floating";
};

Defined in: components/panelOverlay/types.ts:167

Where to move a managed widget with useFloatingWidgets().move() (7.11.0). Its owner panel is always the reference: 'docked' splits the owner's group on that side (size is the new panel's share, 0.1–0.9, as in openPanel's dockTo), 'tabbed' adds a tab to the owner's group. 'floating' opens a floating window at rect (workspace pixels), or, without one, where the widget is on screen, at its size. 'panel' brings it back to where it last was inside the panel.

Variables ​

defaultMessages ​

ts
const defaultMessages: {
  alertTitle: {
     defaultMessage: "Information";
     id: "dockable-desktop-alertTitle";
  };
  backIntoPanel: {
     defaultMessage: "Back into the panel";
     id: "dockable-desktop-backIntoPanel";
  };
  cancel: {
     defaultMessage: "Cancel";
     id: "dockable-desktop-cancel";
  };
  close: {
     defaultMessage: "Close";
     id: "dockable-desktop-close";
  };
  closeEmptyGroup: {
     defaultMessage: "Close empty split group";
     id: "dockable-desktop-closeEmptyGroup";
  };
  closeNotification: {
     defaultMessage: "Close notification";
     id: "dockable-desktop-closeNotification";
  };
  closePanel: {
     defaultMessage: "Close Panel";
     id: "dockable-desktop-closePanel";
  };
  closePanelTooltip: {
     defaultMessage: "Close panel";
     id: "dockable-desktop-closePanelTooltip";
  };
  closeSearch: {
     defaultMessage: "Close search";
     id: "dockable-desktop-closeSearch";
  };
  closeTab: {
     defaultMessage: "Close Tab";
     id: "dockable-desktop-closeTab";
  };
  closeTooltip: {
     defaultMessage: "Close";
     id: "dockable-desktop-closeTooltip";
  };
  componentKey: {
     defaultMessage: "Key: {key}";
     id: "dockable-desktop-componentKey";
  };
  componentUnregistered: {
     defaultMessage: "Component Unregistered";
     id: "dockable-desktop-componentUnregistered";
  };
  discardChanges: {
     defaultMessage: "Discard Changes";
     id: "dockable-desktop-discardChanges";
  };
  dockWindow: {
     defaultMessage: "Dock Window";
     id: "dockable-desktop-dockWindow";
  };
  emptyGrid: {
     defaultMessage: "Grid Empty";
     id: "dockable-desktop-emptyGrid";
  };
  emptyGroup: {
     defaultMessage: "Empty Workspace Section";
     id: "dockable-desktop-emptyGroup";
  };
  floatWindow: {
     defaultMessage: "Float Window";
     id: "dockable-desktop-floatWindow";
  };
  inOwnWindow: {
     defaultMessage: "in its own window";
     id: "dockable-desktop-inOwnWindow";
  };
  maximize: {
     defaultMessage: "Maximize";
     id: "dockable-desktop-maximize";
  };
  maximizePanel: {
     defaultMessage: "Maximize Panel";
     id: "dockable-desktop-maximizePanel";
  };
  minimize: {
     defaultMessage: "Minimize";
     id: "dockable-desktop-minimize";
  };
  minimizePanel: {
     defaultMessage: "Minimize Panel";
     id: "dockable-desktop-minimizePanel";
  };
  modalTitle: {
     defaultMessage: "Confirmation";
     id: "dockable-desktop-modalTitle";
  };
  moreActions: {
     defaultMessage: "More actions";
     id: "dockable-desktop-moreActions";
  };
  no: {
     defaultMessage: "No";
     id: "dockable-desktop-no";
  };
  notifications: {
     defaultMessage: "Notifications";
     id: "dockable-desktop-notifications";
  };
  ok: {
     defaultMessage: "OK";
     id: "dockable-desktop-ok";
  };
  popOutBlocked: {
     defaultMessage: "The browser blocked the new window. Allow pop-ups for this site and try again.";
     id: "dockable-desktop-popOutBlocked";
  };
  popOutWindow: {
     defaultMessage: "Open in new window";
     id: "dockable-desktop-popOutWindow";
  };
  restorePanel: {
     defaultMessage: "Restore Panel";
     id: "dockable-desktop-restorePanel";
  };
  restoreSize: {
     defaultMessage: "Restore Size";
     id: "dockable-desktop-restoreSize";
  };
  returnToDesktop: {
     defaultMessage: "Return to desktop";
     id: "dockable-desktop-returnToDesktop";
  };
  scrollTabsLeft: {
     defaultMessage: "Scroll tabs left";
     id: "dockable-desktop-scrollTabsLeft";
  };
  scrollTabsRight: {
     defaultMessage: "Scroll tabs right";
     id: "dockable-desktop-scrollTabsRight";
  };
  scrollTaskbarLeft: {
     defaultMessage: "Scroll taskbar left";
     id: "dockable-desktop-scrollTaskbarLeft";
  };
  scrollTaskbarRight: {
     defaultMessage: "Scroll taskbar right";
     id: "dockable-desktop-scrollTaskbarRight";
  };
  search: {
     defaultMessage: "Search";
     id: "dockable-desktop-search";
  };
  searchPlaceholder: {
     defaultMessage: "Search…";
     id: "dockable-desktop-searchPlaceholder";
  };
  unsavedChangesMessage: {
     defaultMessage: "\"{title}\" has unsaved changes. Do you want to discard your changes and close?";
     id: "dockable-desktop-unsavedChangesMessage";
  };
  unsavedChangesTitle: {
     defaultMessage: "Unsaved Changes";
     id: "dockable-desktop-unsavedChangesTitle";
  };
  untitledPanel: {
     defaultMessage: "Panel";
     id: "dockable-desktop-untitledPanel";
  };
  yes: {
     defaultMessage: "Yes";
     id: "dockable-desktop-yes";
  };
};

Defined in: components/predefinedMessages.ts:13

Type Declaration ​

NameTypeDefault valueDefined in
alertTitle{ defaultMessage: "Information"; id: "dockable-desktop-alertTitle"; }-components/predefinedMessages.ts:48
alertTitle.defaultMessage"Information"'Information'components/predefinedMessages.ts:48
alertTitle.id"dockable-desktop-alertTitle"'dockable-desktop-alertTitle'components/predefinedMessages.ts:48
backIntoPanel{ defaultMessage: "Back into the panel"; id: "dockable-desktop-backIntoPanel"; }-components/predefinedMessages.ts:60
backIntoPanel.defaultMessage"Back into the panel"'Back into the panel'components/predefinedMessages.ts:60
backIntoPanel.id"dockable-desktop-backIntoPanel"'dockable-desktop-backIntoPanel'components/predefinedMessages.ts:60
cancel{ defaultMessage: "Cancel"; id: "dockable-desktop-cancel"; }-components/predefinedMessages.ts:29
cancel.defaultMessage"Cancel"'Cancel'components/predefinedMessages.ts:29
cancel.id"dockable-desktop-cancel"'dockable-desktop-cancel'components/predefinedMessages.ts:29
close{ defaultMessage: "Close"; id: "dockable-desktop-close"; }-components/predefinedMessages.ts:24
close.defaultMessage"Close"'Close'components/predefinedMessages.ts:24
close.id"dockable-desktop-close"'dockable-desktop-close'components/predefinedMessages.ts:24
closeEmptyGroup{ defaultMessage: "Close empty split group"; id: "dockable-desktop-closeEmptyGroup"; }-components/predefinedMessages.ts:25
closeEmptyGroup.defaultMessage"Close empty split group"'Close empty split group'components/predefinedMessages.ts:25
closeEmptyGroup.id"dockable-desktop-closeEmptyGroup"'dockable-desktop-closeEmptyGroup'components/predefinedMessages.ts:25
closeNotification{ defaultMessage: "Close notification"; id: "dockable-desktop-closeNotification"; }-components/predefinedMessages.ts:37
closeNotification.defaultMessage"Close notification"'Close notification'components/predefinedMessages.ts:37
closeNotification.id"dockable-desktop-closeNotification"'dockable-desktop-closeNotification'components/predefinedMessages.ts:37
closePanel{ defaultMessage: "Close Panel"; id: "dockable-desktop-closePanel"; }-components/predefinedMessages.ts:19
closePanel.defaultMessage"Close Panel"'Close Panel'components/predefinedMessages.ts:19
closePanel.id"dockable-desktop-closePanel"'dockable-desktop-closePanel'components/predefinedMessages.ts:19
closePanelTooltip{ defaultMessage: "Close panel"; id: "dockable-desktop-closePanelTooltip"; }-components/predefinedMessages.ts:33
closePanelTooltip.defaultMessage"Close panel"'Close panel'components/predefinedMessages.ts:33
closePanelTooltip.id"dockable-desktop-closePanelTooltip"'dockable-desktop-closePanelTooltip'components/predefinedMessages.ts:33
closeSearch{ defaultMessage: "Close search"; id: "dockable-desktop-closeSearch"; }-components/predefinedMessages.ts:44
closeSearch.defaultMessage"Close search"'Close search'components/predefinedMessages.ts:44
closeSearch.id"dockable-desktop-closeSearch"'dockable-desktop-closeSearch'components/predefinedMessages.ts:44
closeTab{ defaultMessage: "Close Tab"; id: "dockable-desktop-closeTab"; }-components/predefinedMessages.ts:16
closeTab.defaultMessage"Close Tab"'Close Tab'components/predefinedMessages.ts:16
closeTab.id"dockable-desktop-closeTab"'dockable-desktop-closeTab'components/predefinedMessages.ts:16
closeTooltip{ defaultMessage: "Close"; id: "dockable-desktop-closeTooltip"; }-components/predefinedMessages.ts:34
closeTooltip.defaultMessage"Close"'Close'components/predefinedMessages.ts:34
closeTooltip.id"dockable-desktop-closeTooltip"'dockable-desktop-closeTooltip'components/predefinedMessages.ts:34
componentKey{ defaultMessage: "Key: {key}"; id: "dockable-desktop-componentKey"; }-components/predefinedMessages.ts:52
componentKey.defaultMessage"Key: {key}"'Key: {key}'components/predefinedMessages.ts:52
componentKey.id"dockable-desktop-componentKey"'dockable-desktop-componentKey'components/predefinedMessages.ts:52
componentUnregistered{ defaultMessage: "Component Unregistered"; id: "dockable-desktop-componentUnregistered"; }-components/predefinedMessages.ts:51
componentUnregistered.defaultMessage"Component Unregistered"'Component Unregistered'components/predefinedMessages.ts:51
componentUnregistered.id"dockable-desktop-componentUnregistered"'dockable-desktop-componentUnregistered'components/predefinedMessages.ts:51
discardChanges{ defaultMessage: "Discard Changes"; id: "dockable-desktop-discardChanges"; }-components/predefinedMessages.ts:28
discardChanges.defaultMessage"Discard Changes"'Discard Changes'components/predefinedMessages.ts:28
discardChanges.id"dockable-desktop-discardChanges"'dockable-desktop-discardChanges'components/predefinedMessages.ts:28
dockWindow{ defaultMessage: "Dock Window"; id: "dockable-desktop-dockWindow"; }-components/predefinedMessages.ts:20
dockWindow.defaultMessage"Dock Window"'Dock Window'components/predefinedMessages.ts:20
dockWindow.id"dockable-desktop-dockWindow"'dockable-desktop-dockWindow'components/predefinedMessages.ts:20
emptyGrid{ defaultMessage: "Grid Empty"; id: "dockable-desktop-emptyGrid"; }-components/predefinedMessages.ts:50
emptyGrid.defaultMessage"Grid Empty"'Grid Empty'components/predefinedMessages.ts:50
emptyGrid.id"dockable-desktop-emptyGrid"'dockable-desktop-emptyGrid'components/predefinedMessages.ts:50
emptyGroup{ defaultMessage: "Empty Workspace Section"; id: "dockable-desktop-emptyGroup"; }-components/predefinedMessages.ts:49
emptyGroup.defaultMessage"Empty Workspace Section"'Empty Workspace Section'components/predefinedMessages.ts:49
emptyGroup.id"dockable-desktop-emptyGroup"'dockable-desktop-emptyGroup'components/predefinedMessages.ts:49
floatWindow{ defaultMessage: "Float Window"; id: "dockable-desktop-floatWindow"; }-components/predefinedMessages.ts:14
floatWindow.defaultMessage"Float Window"'Float Window'components/predefinedMessages.ts:14
floatWindow.id"dockable-desktop-floatWindow"'dockable-desktop-floatWindow'components/predefinedMessages.ts:14
inOwnWindow{ defaultMessage: "in its own window"; id: "dockable-desktop-inOwnWindow"; }-components/predefinedMessages.ts:58
inOwnWindow.defaultMessage"in its own window"'in its own window'components/predefinedMessages.ts:58
inOwnWindow.id"dockable-desktop-inOwnWindow"'dockable-desktop-inOwnWindow'components/predefinedMessages.ts:58
maximize{ defaultMessage: "Maximize"; id: "dockable-desktop-maximize"; }-components/predefinedMessages.ts:22
maximize.defaultMessage"Maximize"'Maximize'components/predefinedMessages.ts:22
maximize.id"dockable-desktop-maximize"'dockable-desktop-maximize'components/predefinedMessages.ts:22
maximizePanel{ defaultMessage: "Maximize Panel"; id: "dockable-desktop-maximizePanel"; }-components/predefinedMessages.ts:18
maximizePanel.defaultMessage"Maximize Panel"'Maximize Panel'components/predefinedMessages.ts:18
maximizePanel.id"dockable-desktop-maximizePanel"'dockable-desktop-maximizePanel'components/predefinedMessages.ts:18
minimize{ defaultMessage: "Minimize"; id: "dockable-desktop-minimize"; }-components/predefinedMessages.ts:21
minimize.defaultMessage"Minimize"'Minimize'components/predefinedMessages.ts:21
minimize.id"dockable-desktop-minimize"'dockable-desktop-minimize'components/predefinedMessages.ts:21
minimizePanel{ defaultMessage: "Minimize Panel"; id: "dockable-desktop-minimizePanel"; }-components/predefinedMessages.ts:15
minimizePanel.defaultMessage"Minimize Panel"'Minimize Panel'components/predefinedMessages.ts:15
minimizePanel.id"dockable-desktop-minimizePanel"'dockable-desktop-minimizePanel'components/predefinedMessages.ts:15
modalTitle{ defaultMessage: "Confirmation"; id: "dockable-desktop-modalTitle"; }-components/predefinedMessages.ts:46
modalTitle.defaultMessage"Confirmation"'Confirmation'components/predefinedMessages.ts:46
modalTitle.id"dockable-desktop-modalTitle"'dockable-desktop-modalTitle'components/predefinedMessages.ts:46
moreActions{ defaultMessage: "More actions"; id: "dockable-desktop-moreActions"; }-components/predefinedMessages.ts:42
moreActions.defaultMessage"More actions"'More actions'components/predefinedMessages.ts:42
moreActions.id"dockable-desktop-moreActions"'dockable-desktop-moreActions'components/predefinedMessages.ts:42
no{ defaultMessage: "No"; id: "dockable-desktop-no"; }-components/predefinedMessages.ts:31
no.defaultMessage"No"'No'components/predefinedMessages.ts:31
no.id"dockable-desktop-no"'dockable-desktop-no'components/predefinedMessages.ts:31
notifications{ defaultMessage: "Notifications"; id: "dockable-desktop-notifications"; }-components/predefinedMessages.ts:36
notifications.defaultMessage"Notifications"'Notifications'components/predefinedMessages.ts:36
notifications.id"dockable-desktop-notifications"'dockable-desktop-notifications'components/predefinedMessages.ts:36
ok{ defaultMessage: "OK"; id: "dockable-desktop-ok"; }-components/predefinedMessages.ts:32
ok.defaultMessage"OK"'OK'components/predefinedMessages.ts:32
ok.id"dockable-desktop-ok"'dockable-desktop-ok'components/predefinedMessages.ts:32
popOutBlocked{ defaultMessage: "The browser blocked the new window. Allow pop-ups for this site and try again."; id: "dockable-desktop-popOutBlocked"; }-components/predefinedMessages.ts:61
popOutBlocked.defaultMessage"The browser blocked the new window. Allow pop-ups for this site and try again."'The browser blocked the new window. Allow pop-ups for this site and try again.'components/predefinedMessages.ts:61
popOutBlocked.id"dockable-desktop-popOutBlocked"'dockable-desktop-popOutBlocked'components/predefinedMessages.ts:61
popOutWindow{ defaultMessage: "Open in new window"; id: "dockable-desktop-popOutWindow"; }-components/predefinedMessages.ts:55
popOutWindow.defaultMessage"Open in new window"'Open in new window'components/predefinedMessages.ts:55
popOutWindow.id"dockable-desktop-popOutWindow"'dockable-desktop-popOutWindow'components/predefinedMessages.ts:55
restorePanel{ defaultMessage: "Restore Panel"; id: "dockable-desktop-restorePanel"; }-components/predefinedMessages.ts:17
restorePanel.defaultMessage"Restore Panel"'Restore Panel'components/predefinedMessages.ts:17
restorePanel.id"dockable-desktop-restorePanel"'dockable-desktop-restorePanel'components/predefinedMessages.ts:17
restoreSize{ defaultMessage: "Restore Size"; id: "dockable-desktop-restoreSize"; }-components/predefinedMessages.ts:23
restoreSize.defaultMessage"Restore Size"'Restore Size'components/predefinedMessages.ts:23
restoreSize.id"dockable-desktop-restoreSize"'dockable-desktop-restoreSize'components/predefinedMessages.ts:23
returnToDesktop{ defaultMessage: "Return to desktop"; id: "dockable-desktop-returnToDesktop"; }-components/predefinedMessages.ts:56
returnToDesktop.defaultMessage"Return to desktop"'Return to desktop'components/predefinedMessages.ts:56
returnToDesktop.id"dockable-desktop-returnToDesktop"'dockable-desktop-returnToDesktop'components/predefinedMessages.ts:56
scrollTabsLeft{ defaultMessage: "Scroll tabs left"; id: "dockable-desktop-scrollTabsLeft"; }-components/predefinedMessages.ts:38
scrollTabsLeft.defaultMessage"Scroll tabs left"'Scroll tabs left'components/predefinedMessages.ts:38
scrollTabsLeft.id"dockable-desktop-scrollTabsLeft"'dockable-desktop-scrollTabsLeft'components/predefinedMessages.ts:38
scrollTabsRight{ defaultMessage: "Scroll tabs right"; id: "dockable-desktop-scrollTabsRight"; }-components/predefinedMessages.ts:39
scrollTabsRight.defaultMessage"Scroll tabs right"'Scroll tabs right'components/predefinedMessages.ts:39
scrollTabsRight.id"dockable-desktop-scrollTabsRight"'dockable-desktop-scrollTabsRight'components/predefinedMessages.ts:39
scrollTaskbarLeft{ defaultMessage: "Scroll taskbar left"; id: "dockable-desktop-scrollTaskbarLeft"; }-components/predefinedMessages.ts:40
scrollTaskbarLeft.defaultMessage"Scroll taskbar left"'Scroll taskbar left'components/predefinedMessages.ts:40
scrollTaskbarLeft.id"dockable-desktop-scrollTaskbarLeft"'dockable-desktop-scrollTaskbarLeft'components/predefinedMessages.ts:40
scrollTaskbarRight{ defaultMessage: "Scroll taskbar right"; id: "dockable-desktop-scrollTaskbarRight"; }-components/predefinedMessages.ts:41
scrollTaskbarRight.defaultMessage"Scroll taskbar right"'Scroll taskbar right'components/predefinedMessages.ts:41
scrollTaskbarRight.id"dockable-desktop-scrollTaskbarRight"'dockable-desktop-scrollTaskbarRight'components/predefinedMessages.ts:41
search{ defaultMessage: "Search"; id: "dockable-desktop-search"; }-components/predefinedMessages.ts:43
search.defaultMessage"Search"'Search'components/predefinedMessages.ts:43
search.id"dockable-desktop-search"'dockable-desktop-search'components/predefinedMessages.ts:43
searchPlaceholder{ defaultMessage: "Search…"; id: "dockable-desktop-searchPlaceholder"; }-components/predefinedMessages.ts:45
searchPlaceholder.defaultMessage"Search…"'Search…'components/predefinedMessages.ts:45
searchPlaceholder.id"dockable-desktop-searchPlaceholder"'dockable-desktop-searchPlaceholder'components/predefinedMessages.ts:45
unsavedChangesMessage{ defaultMessage: ""{title}" has unsaved changes. Do you want to discard your changes and close?"; id: "dockable-desktop-unsavedChangesMessage"; }-components/predefinedMessages.ts:27
unsavedChangesMessage.defaultMessage""{title}" has unsaved changes. Do you want to discard your changes and close?"'"{title}" has unsaved changes. Do you want to discard your changes and close?'components/predefinedMessages.ts:27
unsavedChangesMessage.id"dockable-desktop-unsavedChangesMessage"'dockable-desktop-unsavedChangesMessage'components/predefinedMessages.ts:27
unsavedChangesTitle{ defaultMessage: "Unsaved Changes"; id: "dockable-desktop-unsavedChangesTitle"; }-components/predefinedMessages.ts:26
unsavedChangesTitle.defaultMessage"Unsaved Changes"'Unsaved Changes'components/predefinedMessages.ts:26
unsavedChangesTitle.id"dockable-desktop-unsavedChangesTitle"'dockable-desktop-unsavedChangesTitle'components/predefinedMessages.ts:26
untitledPanel{ defaultMessage: "Panel"; id: "dockable-desktop-untitledPanel"; }-components/predefinedMessages.ts:53
untitledPanel.defaultMessage"Panel"'Panel'components/predefinedMessages.ts:53
untitledPanel.id"dockable-desktop-untitledPanel"'dockable-desktop-untitledPanel'components/predefinedMessages.ts:53
yes{ defaultMessage: "Yes"; id: "dockable-desktop-yes"; }-components/predefinedMessages.ts:30
yes.defaultMessage"Yes"'Yes'components/predefinedMessages.ts:30
yes.id"dockable-desktop-yes"'dockable-desktop-yes'components/predefinedMessages.ts:30

File ​

predefinedMessages.ts

Description ​

Provides the default localizable message catalogs and translation keys utilized by Dockable Desktop's context menus, headers, and tooltips.

Each value's id is the react-intl message ID that the consumer should define in their IntlProvider messages table. The defaultMessage is used as a fallback when no external formatter is provided.

Pass a partial or full override as createWorkspace({ messages }) or <DockableDesktopProvider messages={…}> to customise labels without replacing the whole table.


DockableDesktopProvider ​

ts
const DockableDesktopProvider: React.FC<DockableDesktopProviderProps>;

Defined in: components/DockableDesktopProvider.tsx:103

The one provider. Place it above everything from this library: <RddDesktop>, <RddSidebar>, <RddToolbar>, <RddSidePanels>, <RddModals>.

Example ​

tsx
const workspace = createWorkspace({ panels: { map: { component: MapPanel } } });

<DockableDesktopProvider workspace={workspace}>
  <RddSidebar tabs={tabs}>
    <RddDesktop />
  </RddSidebar>
  <RddSidePanels />
  <RddModals />
</DockableDesktopProvider>

RddAlert ​

ts
const RddAlert: React.FC<RddAlertProps>;

Defined in: forms/AlertForm.tsx:38

RddAlert shows a message with a single OK button. Open it with useModals().open or useModals().alert().


RddConfirm ​

ts
const RddConfirm: React.FC<RddConfirmProps>;

Defined in: forms/ConfirmationForm.tsx:43

RddConfirm component renders a standard dialog content layout, allowing users to confirm actions or abort them. Exposes action callbacks.


RddContextMenu ​

ts
const RddContextMenu: React.ForwardRefExoticComponent<RddContextMenuProps & React.RefAttributes<ContextMenuHandle>>;

Defined in: api/index.tsx:396

A context menu. Inside <DockableDesktopProvider> one is already provided — use useContextMenu() or showContextMenu() and you need no RddContextMenu at all.


RddDesktop ​

ts
const RddDesktop: React.FC<RddDesktopProps>;

Defined in: components/WindowManager.tsx:100

The desktop itself: the docked grid of tab groups, the floating windows, the taskbar of minimized panels, and the drop targets while a panel is dragged. Render it inside <DockableDesktopProvider>, in a container that gives it a size (rdd-fill-viewport fills the page), and import react-dockable-desktop/styles.css once.

Exported as RddDesktop.

Example ​

tsx
<DockableDesktopProvider workspace={workspace}>
  <div className="rdd-fill-viewport">
    <RddDesktop skin="vscode" taskbarVisibility="autohide" />
  </div>
  <RddModals />
</DockableDesktopProvider>

RddModals ​

ts
const RddModals: React.FC;

Defined in: components/ModalStackRenderer.tsx:159

Renders the modals opened through useModals(), stacked, topmost last. Mount one, inside <DockableDesktopProvider>.


RddSecondarySidebar ​

ts
const RddSecondarySidebar: React.ForwardRefExoticComponent<RddSecondarySidebarProps & React.RefAttributes<SidebarHandle>>;

Defined in: components/Sidebar.tsx:795

A second, independent Sidebar instance for the opposite edge of the screen — same component, same behavior, zero forked code. Must be rendered inside a primary Sidebar's children; automatically takes whichever side that primary isn't using, so the side is never specified directly.

Throws ​

Error if rendered without an ancestor Sidebar, or nested inside another RddSecondarySidebar — this library supports exactly one primary and one secondary, nothing deeper.


RddSidebar ​

ts
const RddSidebar: React.ForwardRefExoticComponent<RddSidebarProps & React.RefAttributes<SidebarHandle>>;

Defined in: components/Sidebar.tsx:465


RddToolbar ​

ts
const RddToolbar: React.ForwardRefExoticComponent<RddToolbarProps & React.RefAttributes<ToolbarHandle>>;

Defined in: components/Toolbar.tsx:456


toast ​

ts
const toast: ToastFunction;

Defined in: components/Toast.tsx:215

Imperative notification singleton. Call from anywhere — inside or outside React. Mount <RddToasts> once at your app root to activate the renderer.

Example ​

ts
toast.success('File saved.');
toast.error('Upload failed.', { duration: 0 }); // sticky
toast.promise(saveFile(), { pending: 'Saving…', success: 'Saved!', error: 'Failed.' });

Released under the MIT License.