BaseWindowProps
Defined in: shared/types.ts:334
Base window props (shared between Window and PooledWindow)
Extended by
Section titled “Extended by”Properties
Section titled “Properties”alwaysOnTop?
Section titled “alwaysOnTop?”
optionalalwaysOnTop:boolean|AlwaysOnTopLevel
Defined in: shared/types.ts:484
Whether the window should always be on top.
backgroundColor?
Section titled “backgroundColor?”
optionalbackgroundColor:string
Defined in: shared/types.ts:454
Background color
center?
Section titled “center?”
optionalcenter:boolean
Defined in: shared/types.ts:422
Center the window on creation. Default: true if no x/y specified.
closable?
Section titled “closable?”
optionalclosable:boolean
Defined in: shared/types.ts:362
Whether the user can close the window. Default: true. When false, the close button is hidden/disabled.
defaultHeight?
Section titled “defaultHeight?”
optionaldefaultHeight:number
Defined in: shared/types.ts:370
Initial height. Only applied on window creation.
defaultWidth?
Section titled “defaultWidth?”
optionaldefaultWidth:number
Defined in: shared/types.ts:367
Initial width. Only applied on window creation.
defaultX?
Section titled “defaultX?”
optionaldefaultX:number
Defined in: shared/types.ts:373
Initial x position. Only applied on window creation.
defaultY?
Section titled “defaultY?”
optionaldefaultY:number
Defined in: shared/types.ts:376
Initial y position. Only applied on window creation.
focusable?
Section titled “focusable?”
optionalfocusable:boolean
Defined in: shared/types.ts:481
Whether the window is focusable. Default: true.
frame?
Section titled “frame?”
optionalframe:boolean
Defined in: shared/types.ts:439
Show window frame (title bar, borders). Creation-only.
Creation Only
Section titled “Creation Only”Cannot be changed after window creation.
fullscreen?
Section titled “fullscreen?”
optionalfullscreen:boolean
Defined in: shared/types.ts:495
Enter/exit fullscreen mode
fullscreenable?
Section titled “fullscreenable?”
optionalfullscreenable:boolean
Defined in: shared/types.ts:498
Whether the window can enter fullscreen. Default: true.
height?
Section titled “height?”
optionalheight:number
Defined in: shared/types.ts:390
Controlled height. Changes will resize the window. Use with onBoundsChange for two-way sync.
ignoreMouseEvents?
Section titled “ignoreMouseEvents?”
optionalignoreMouseEvents:boolean
Defined in: shared/types.ts:506
Ignore mouse events (click-through window)
injectStyles?
Section titled “injectStyles?”
optionalinjectStyles:InjectStylesMode
Defined in: shared/types.ts:554
How to inject styles into the new window.
- “auto”: Copy
- false: No injection (for CSS-in-JS)
- function: Custom injection (replaces the auto mirroring entirely)
maxHeight?
Section titled “maxHeight?”
optionalmaxHeight:number
Defined in: shared/types.ts:419
Maximum height constraint
maximizable?
Section titled “maximizable?”
optionalmaximizable:boolean
Defined in: shared/types.ts:478
Whether the window can be maximized. Default: true.
maxWidth?
Section titled “maxWidth?”
optionalmaxWidth:number
Defined in: shared/types.ts:413
Maximum width constraint
minHeight?
Section titled “minHeight?”
optionalminHeight:number
Defined in: shared/types.ts:416
Minimum height constraint
minimizable?
Section titled “minimizable?”
optionalminimizable:boolean
Defined in: shared/types.ts:475
Whether the window can be minimized. Default: true.
minWidth?
Section titled “minWidth?”
optionalminWidth:number
Defined in: shared/types.ts:410
Minimum width constraint
movable?
Section titled “movable?”
optionalmovable:boolean
Defined in: shared/types.ts:472
Whether the window is movable. Default: true.
optionalname:string
Defined in: shared/types.ts:536
Debug name for DevTools and error messages. Useful for identifying windows in multi-window apps.
onBlur()?
Section titled “onBlur()?”
optionalonBlur: () =>void
Defined in: shared/types.ts:577
Fired when the window loses focus
Returns
Section titled “Returns”void
onBoundsChange()?
Section titled “onBoundsChange()?”
optionalonBoundsChange: (bounds) =>void
Defined in: shared/types.ts:405
Callback fired when window bounds change (resize or move). Debounced internally.
Parameters
Section titled “Parameters”bounds
Section titled “bounds”Returns
Section titled “Returns”void
onClose()?
Section titled “onClose()?”
optionalonClose: () =>void
Defined in: shared/types.ts:580
Fired when the window is destroyed (for any reason — user close, programmatic, unmount)
Returns
Section titled “Returns”void
onDisplayChange()?
Section titled “onDisplayChange()?”
optionalonDisplayChange: (display) =>void
Defined in: shared/types.ts:589
Fired when window moves to a different display
Parameters
Section titled “Parameters”display
Section titled “display”Returns
Section titled “Returns”void
onEnterFullscreen()?
Section titled “onEnterFullscreen()?”
optionalonEnterFullscreen: () =>void
Defined in: shared/types.ts:583
Fired when window enters fullscreen
Returns
Section titled “Returns”void
onExitFullscreen()?
Section titled “onExitFullscreen()?”
optionalonExitFullscreen: () =>void
Defined in: shared/types.ts:586
Fired when window exits fullscreen (maps to Electron’s ‘leave-full-screen’ event)
Returns
Section titled “Returns”void
onFocus()?
Section titled “onFocus()?”
optionalonFocus: () =>void
Defined in: shared/types.ts:574
Fired when the window gains focus
Returns
Section titled “Returns”void
onMaximize()?
Section titled “onMaximize()?”
optionalonMaximize: () =>void
Defined in: shared/types.ts:562
Fired when window is maximized
Returns
Section titled “Returns”void
onMinimize()?
Section titled “onMinimize()?”
optionalonMinimize: () =>void
Defined in: shared/types.ts:568
Fired when window is minimized
Returns
Section titled “Returns”void
onReady()?
Section titled “onReady()?”
optionalonReady: () =>void
Defined in: shared/types.ts:559
Fired when window is ready and content is mounted
Returns
Section titled “Returns”void
onRestore()?
Section titled “onRestore()?”
optionalonRestore: () =>void
Defined in: shared/types.ts:571
Fired when window is restored from minimized
Returns
Section titled “Returns”void
onUnmaximize()?
Section titled “onUnmaximize()?”
optionalonUnmaximize: () =>void
Defined in: shared/types.ts:565
Fired when window is unmaximized
Returns
Section titled “Returns”void
onUserClose()?
Section titled “onUserClose()?”
optionalonUserClose: () =>void
Defined in: shared/types.ts:356
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).
Returns
Section titled “Returns”void
opacity?
Section titled “opacity?”
optionalopacity:number
Defined in: shared/types.ts:457
Window opacity (0.0 to 1.0)
open:
boolean
Defined in: shared/types.ts:340
Whether the window should be open/visible. When true, the window is created/shown. When false, the window is destroyed.
persistBounds?
Section titled “persistBounds?”
optionalpersistBounds:string
Defined in: shared/types.ts:544
Persist window bounds with this key. Bounds are saved on resize/move and restored on next open.
recreateOnShapeChange?
Section titled “recreateOnShapeChange?”
optionalrecreateOnShapeChange:boolean
Defined in: shared/types.ts:530
Recreate window when creation-only props change. Default: false (log warning instead).
resizable?
Section titled “resizable?”
optionalresizable:boolean
Defined in: shared/types.ts:469
Whether the window is resizable. Default: true.
showInactive?
Section titled “showInactive?”
optionalshowInactive:boolean
Defined in: shared/types.ts:503
Show window without stealing focus
skipTaskbar?
Section titled “skipTaskbar?”
optionalskipTaskbar:boolean
Defined in: shared/types.ts:490
Whether to skip showing in taskbar/dock.
targetDisplay?
Section titled “targetDisplay?”
optionaltargetDisplay:TargetDisplay
Defined in: shared/types.ts:522
Which display to open the window on
title?
Section titled “title?”
optionaltitle:string
Defined in: shared/types.ts:427
Window title
titleBarOverlay?
Section titled “titleBarOverlay?”
optionaltitleBarOverlay:TitleBarOverlayOptions
Defined in: shared/types.ts:517
Title bar overlay options (Windows)
titleBarStyle?
Section titled “titleBarStyle?”
optionaltitleBarStyle:TitleBarStyle
Defined in: shared/types.ts:445
Title bar style. Creation-only.
Creation Only
Section titled “Creation Only”Cannot be changed after window creation.
trafficLightPosition?
Section titled “trafficLightPosition?”
optionaltrafficLightPosition:object
Defined in: shared/types.ts:514
Traffic light (close/minimize/maximize) button position (macOS)
x:
number
y:
number
transparent?
Section titled “transparent?”
optionaltransparent:boolean
Defined in: shared/types.ts:433
Make the window transparent. Creation-only.
Creation Only
Section titled “Creation Only”Cannot be changed after window creation.
vibrancy?
Section titled “vibrancy?”
optionalvibrancy:VibrancyType
Defined in: shared/types.ts:451
Vibrancy effect (macOS only). Creation-only.
Creation Only
Section titled “Creation Only”Cannot be changed after window creation.
visible?
Section titled “visible?”
optionalvisible:boolean
Defined in: shared/types.ts:466
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.
visibleOnAllWorkspaces?
Section titled “visibleOnAllWorkspaces?”
optionalvisibleOnAllWorkspaces:boolean
Defined in: shared/types.ts:509
Visible on all workspaces/virtual desktops
width?
Section titled “width?”
optionalwidth:number
Defined in: shared/types.ts:384
Controlled width. Changes will resize the window. Use with onBoundsChange for two-way sync.
optionalx:number
Defined in: shared/types.ts:396
Controlled x position. Changes will move the window. Use with onBoundsChange for two-way sync.
optionaly:number
Defined in: shared/types.ts:402
Controlled y position. Changes will move the window. Use with onBoundsChange for two-way sync.