Skip to content

PooledWindowProps

Defined in: renderer/PooledWindow.tsx:122

optional alwaysOnTop: boolean | AlwaysOnTopLevel

Defined in: shared/types.ts:432

Whether the window should always be on top.

WindowProps.alwaysOnTop


optional backgroundColor: string

Defined in: shared/types.ts:402

Background color

WindowProps.backgroundColor


optional center: boolean

Defined in: shared/types.ts:370

Center the window on creation. Default: true if no x/y specified.

WindowProps.center


children: ReactNode

Defined in: renderer/PooledWindow.tsx:126

Content to render inside the window


optional closable: boolean

Defined in: shared/types.ts:310

Whether the user can close the window. Default: true. When false, the close button is hidden/disabled.

WindowProps.closable


optional defaultHeight: number

Defined in: shared/types.ts:318

Initial height. Only applied on window creation.

WindowProps.defaultHeight


optional defaultWidth: number

Defined in: shared/types.ts:315

Initial width. Only applied on window creation.

WindowProps.defaultWidth


optional defaultX: number

Defined in: shared/types.ts:321

Initial x position. Only applied on window creation.

WindowProps.defaultX


optional defaultY: number

Defined in: shared/types.ts:324

Initial y position. Only applied on window creation.

WindowProps.defaultY


optional focusable: boolean

Defined in: shared/types.ts:429

Whether the window is focusable. Default: true.

WindowProps.focusable


optional fullscreen: boolean

Defined in: shared/types.ts:443

Enter/exit fullscreen mode

WindowProps.fullscreen


optional fullscreenable: boolean

Defined in: shared/types.ts:446

Whether the window can enter fullscreen. Default: true.

WindowProps.fullscreenable


optional height: number

Defined in: shared/types.ts:338

Controlled height. Changes will resize the window. Use with onBoundsChange for two-way sync.

WindowProps.height


optional ignoreMouseEvents: boolean

Defined in: shared/types.ts:454

Ignore mouse events (click-through window)

WindowProps.ignoreMouseEvents


optional maxHeight: number

Defined in: shared/types.ts:367

Maximum height constraint

WindowProps.maxHeight


optional maximizable: boolean

Defined in: shared/types.ts:426

Whether the window can be maximized. Default: true.

WindowProps.maximizable


optional maxWidth: number

Defined in: shared/types.ts:361

Maximum width constraint

WindowProps.maxWidth


optional minHeight: number

Defined in: shared/types.ts:364

Minimum height constraint

WindowProps.minHeight


optional minimizable: boolean

Defined in: shared/types.ts:423

Whether the window can be minimized. Default: true.

WindowProps.minimizable


optional minWidth: number

Defined in: shared/types.ts:358

Minimum width constraint

WindowProps.minWidth


optional movable: boolean

Defined in: shared/types.ts:420

Whether the window is movable. Default: true.

WindowProps.movable


optional name: string

Defined in: shared/types.ts:484

Debug name for DevTools and error messages. Useful for identifying windows in multi-window apps.

WindowProps.name


optional onBlur: () => void

Defined in: shared/types.ts:525

Fired when the window loses focus

void

WindowProps.onBlur


optional onBoundsChange: (bounds) => void

Defined in: shared/types.ts:353

Callback fired when window bounds change (resize or move). Debounced internally.

Bounds

void

WindowProps.onBoundsChange


optional onClose: () => void

Defined in: shared/types.ts:528

Fired when the window is destroyed (for any reason — user close, programmatic, unmount)

void

WindowProps.onClose


optional onDisplayChange: (display) => void

Defined in: shared/types.ts:537

Fired when window moves to a different display

DisplayInfo

void

WindowProps.onDisplayChange


optional onEnterFullscreen: () => void

Defined in: shared/types.ts:531

Fired when window enters fullscreen

void

WindowProps.onEnterFullscreen


optional onExitFullscreen: () => void

Defined in: shared/types.ts:534

Fired when window exits fullscreen (maps to Electron’s ‘leave-full-screen’ event)

void

WindowProps.onExitFullscreen


optional onFocus: () => void

Defined in: shared/types.ts:522

Fired when the window gains focus

void

WindowProps.onFocus


optional onMaximize: () => void

Defined in: shared/types.ts:510

Fired when window is maximized

void

WindowProps.onMaximize


optional onMinimize: () => void

Defined in: shared/types.ts:516

Fired when window is minimized

void

WindowProps.onMinimize


optional onReady: () => void

Defined in: shared/types.ts:507

Fired when window is ready and content is mounted

void

WindowProps.onReady


optional onRestore: () => void

Defined in: shared/types.ts:519

Fired when window is restored from minimized

void

WindowProps.onRestore


optional onUnmaximize: () => void

Defined in: shared/types.ts:513

Fired when window is unmaximized

void

WindowProps.onUnmaximize


optional onUserClose: () => void

Defined in: shared/types.ts:304

Called when the user initiates a close (e.g., clicks the X button).

Fires during Electron’s close event — the window is about to close but hasn’t yet. Use this to sync your open state back to false. The window will close on its own; your open={false} is for your state consistency, not to drive the close.

This is a notification, not an interceptor. To prevent close, set closable={false} proactively (e.g., closable={!hasUnsavedChanges}).

onClose (a separate callback) fires after the window is fully destroyed, for any reason (user, programmatic, unmount).

void

WindowProps.onUserClose


optional opacity: number

Defined in: shared/types.ts:405

Window opacity (0.0 to 1.0)

WindowProps.opacity


open: boolean

Defined in: shared/types.ts:288

Whether the window should be open/visible. When true, the window is created/shown. When false, the window is destroyed.

WindowProps.open


pool: WindowPoolDefinition

Defined in: renderer/PooledWindow.tsx:124

Pool to acquire windows from


optional resizable: boolean

Defined in: shared/types.ts:417

Whether the window is resizable. Default: true.

WindowProps.resizable


optional showInactive: boolean

Defined in: shared/types.ts:451

Show window without stealing focus

WindowProps.showInactive


optional skipTaskbar: boolean

Defined in: shared/types.ts:438

Whether to skip showing in taskbar/dock.

WindowProps.skipTaskbar


optional title: string

Defined in: shared/types.ts:375

Window title

WindowProps.title


optional titleBarOverlay: TitleBarOverlayOptions

Defined in: shared/types.ts:465

Title bar overlay options (Windows)

WindowProps.titleBarOverlay


optional trafficLightPosition: object

Defined in: shared/types.ts:462

Traffic light (close/minimize/maximize) button position (macOS)

x: number

y: number

WindowProps.trafficLightPosition


optional visible: boolean

Defined in: shared/types.ts:414

Whether the window is visible. Default: true. Set to false to hide the window without destroying it (state is preserved). Unlike open, which controls the window’s existence, visible controls whether it’s shown.

WindowProps.visible


optional visibleOnAllWorkspaces: boolean

Defined in: shared/types.ts:457

Visible on all workspaces/virtual desktops

WindowProps.visibleOnAllWorkspaces


optional width: number

Defined in: shared/types.ts:332

Controlled width. Changes will resize the window. Use with onBoundsChange for two-way sync.

WindowProps.width


optional x: number

Defined in: shared/types.ts:344

Controlled x position. Changes will move the window. Use with onBoundsChange for two-way sync.

WindowProps.x


optional y: number

Defined in: shared/types.ts:350

Controlled y position. Changes will move the window. Use with onBoundsChange for two-way sync.

WindowProps.y