Skip to content

WorkbenchProps

Defined in: react/components/layout/workbench.tsx:30

Props shared by every ztui React component (plus each component’s own props).

optional children?: ReactNode

Defined in: react/components/layout/workbench.tsx:34

Center/editor content.

ComponentProps.children


optional className?: string

Defined in: react/components/types.ts:24

Space-separated class names (currently advisory; no CSS cascade).

ComponentProps.className


optional disabled?: boolean

Defined in: react/components/types.ts:52

Marks the widget (and its descendants) as inert: not focusable, ignores key/mouse input, and interactive controls render in a muted style. A disabled container propagates to every control inside it.

ComponentProps.disabled


optional focusable?: boolean

Defined in: react/components/types.ts:40

Allow this widget to take keyboard focus.

ComponentProps.focusable


optional focusOnClick?: boolean

Defined in: react/components/types.ts:46

When a click lands on this container (its padding, border, or a non-focusable child), move focus to its first focusable descendant — so clicking a Form/Panel/Box hands focus to its first field. Off by default.

ComponentProps.focusOnClick


optional hoverInterest?: boolean

Defined in: react/components/types.ts:66

Opt-in hint that this widget cares about passive hover movement.

ComponentProps.hoverInterest


optional id?: string

Defined in: react/components/types.ts:22

Stable identifier, handy for tests and lookups.

ComponentProps.id


optional initialLayout?: WorkbenchLayout

Defined in: react/components/layout/workbench.tsx:44

Serializable layout snapshot to restore on mount (open/size/active per region). Takes precedence over initialOpen/initialSizes. Pair with WorkbenchProps.onLayoutChange to persist and reload layout.


optional initialOpen?: WorkbenchAnchor[]

Defined in: react/components/layout/workbench.tsx:36

Regions that start expanded (with their first panel active).


optional initialSizes?: Partial<Record<WorkbenchAnchor, number>>

Defined in: react/components/layout/workbench.tsx:38

Starting sizes per region (cells). Defaults: side 26, bottom 8.


optional label?: string

Defined in: react/components/types.ts:36

Structural/accessible label (also the tab title inside TabContainer).

ComponentProps.label


optional onClick?: (ev) => void

Defined in: react/components/types.ts:54

Pointer click.

any

void

ComponentProps.onClick


optional onDragEnd?: (x, y, moved) => void

Defined in: react/components/types.ts:72

Drag released; moved is false for a tap with no movement.

number

number

boolean

void

ComponentProps.onDragEnd


optional onDragMove?: (x, y) => void

Defined in: react/components/types.ts:70

Pointer moved while dragging from this widget.

number

number

void

ComponentProps.onDragMove


optional onDragStart?: (x, y) => void

Defined in: react/components/types.ts:68

Pointer-drag lifecycle; moved is false for a tap with no movement.

number

number

void

ComponentProps.onDragStart


optional onKey?: (ev) => void

Defined in: react/components/types.ts:58

Key event while focused; set ev.handled to consume it.

any

void

ComponentProps.onKey


optional onLayoutChange?: (layout) => void

Defined in: react/components/layout/workbench.tsx:46

Fired with a fresh snapshot whenever the layout changes (for persistence).

WorkbenchLayout

void


optional onMouseDown?: (ev) => void

Defined in: react/components/types.ts:56

Pointer pressed (any button); the event carries button and x/y.

any

void

ComponentProps.onMouseDown


optional onMouseEnter?: (ev) => void

Defined in: react/components/types.ts:62

Pointer entered this widget’s region.

any

void

ComponentProps.onMouseEnter


optional onMouseLeave?: (ev) => void

Defined in: react/components/types.ts:64

Pointer left this widget’s region.

any

void

ComponentProps.onMouseLeave


optional onScroll?: (ev) => void

Defined in: react/components/types.ts:60

Wheel / scroll event.

any

void

ComponentProps.onScroll


panels: WorkbenchPanel[]

Defined in: react/components/layout/workbench.tsx:32

The dockable panels.


optional ref?: Ref<Widget>

Defined in: react/components/types.ts:30

Captures the underlying widget instance (React 19 ref-as-prop). Defaults to the base Widget; narrow it with a cast when you need a subclass field, e.g. ref={inputRef as React.Ref<InputWidget>}.

ComponentProps.ref


optional style?: WidgetStyles

Defined in: react/components/types.ts:32

Inline styles for this widget — see the Styling guide.

ComponentProps.style


optional theme?: string

Defined in: react/components/types.ts:34

Re-theme this subtree; descendants resolve $tokens against it.

ComponentProps.theme


optional toggleKeys?: Partial<Record<WorkbenchAnchor, string>>

Defined in: react/components/layout/workbench.tsx:54

Keys that toggle each region. Defaults to DEFAULT_TOGGLE_KEYS. Note: ctrl+j/ctrl+i/ctrl+m can’t be used — terminals deliver them as Enter/Tab — and alt/ctrl+alt combos only reach apps under the Kitty keyboard protocol. The default bottom key is `ctrl+“ (a.k.a. ctrl+space), which works on legacy terminals too.