BaseWindowProps
Defined in: shared/types.ts:282
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:432
Whether the window should always be on top.
backgroundColor?
Section titled “backgroundColor?”
optionalbackgroundColor:string
Defined in: shared/types.ts:402
Background color
center?
Section titled “center?”
optionalcenter:boolean
Defined in: shared/types.ts:370
Center the window on creation. Default: true if no x/y specified.
closable?
Section titled “closable?”
optionalclosable:boolean
Defined in: shared/types.ts:310
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:318
Initial height. Only applied on window creation.
defaultWidth?
Section titled “defaultWidth?”
optionaldefaultWidth:number
Defined in: shared/types.ts:315
Initial width. Only applied on window creation.
defaultX?
Section titled “defaultX?”
optionaldefaultX:number
Defined in: shared/types.ts:321
Initial x position. Only applied on window creation.
defaultY?
Section titled “defaultY?”
optionaldefaultY:number
Defined in: shared/types.ts:324
Initial y position. Only applied on window creation.
focusable?
Section titled “focusable?”
optionalfocusable:boolean
Defined in: shared/types.ts:429
Whether the window is focusable. Default: true.
frame?
Section titled “frame?”
optionalframe:boolean
Defined in: shared/types.ts:387
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:443
Enter/exit fullscreen mode
fullscreenable?
Section titled “fullscreenable?”
optionalfullscreenable:boolean
Defined in: shared/types.ts:446
Whether the window can enter fullscreen. Default: true.
height?
Section titled “height?”
optionalheight:number
Defined in: shared/types.ts:338
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:454
Ignore mouse events (click-through window)
injectStyles?
Section titled “injectStyles?”
optionalinjectStyles:InjectStylesMode
Defined in: shared/types.ts:502
How to inject styles into the new window.
- “auto”: Copy
- false: No injection (for CSS-in-JS)
- function: Custom injection
maxHeight?
Section titled “maxHeight?”
optionalmaxHeight:number
Defined in: shared/types.ts:367
Maximum height constraint
maximizable?
Section titled “maximizable?”
optionalmaximizable:boolean
Defined in: shared/types.ts:426
Whether the window can be maximized. Default: true.
maxWidth?
Section titled “maxWidth?”
optionalmaxWidth:number
Defined in: shared/types.ts:361
Maximum width constraint
minHeight?
Section titled “minHeight?”
optionalminHeight:number
Defined in: shared/types.ts:364
Minimum height constraint
minimizable?
Section titled “minimizable?”
optionalminimizable:boolean
Defined in: shared/types.ts:423
Whether the window can be minimized. Default: true.
minWidth?
Section titled “minWidth?”
optionalminWidth:number
Defined in: shared/types.ts:358
Minimum width constraint
movable?
Section titled “movable?”
optionalmovable:boolean
Defined in: shared/types.ts:420
Whether the window is movable. Default: true.
optionalname:string
Defined in: shared/types.ts:484
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:525
Fired when the window loses focus
Returns
Section titled “Returns”void
onBoundsChange()?
Section titled “onBoundsChange()?”
optionalonBoundsChange: (bounds) =>void
Defined in: shared/types.ts:353
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:528
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:537
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:531
Fired when window enters fullscreen
Returns
Section titled “Returns”void
onExitFullscreen()?
Section titled “onExitFullscreen()?”
optionalonExitFullscreen: () =>void
Defined in: shared/types.ts:534
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:522
Fired when the window gains focus
Returns
Section titled “Returns”void
onMaximize()?
Section titled “onMaximize()?”
optionalonMaximize: () =>void
Defined in: shared/types.ts:510
Fired when window is maximized
Returns
Section titled “Returns”void
onMinimize()?
Section titled “onMinimize()?”
optionalonMinimize: () =>void
Defined in: shared/types.ts:516
Fired when window is minimized
Returns
Section titled “Returns”void
onReady()?
Section titled “onReady()?”
optionalonReady: () =>void
Defined in: shared/types.ts:507
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:519
Fired when window is restored from minimized
Returns
Section titled “Returns”void
onUnmaximize()?
Section titled “onUnmaximize()?”
optionalonUnmaximize: () =>void
Defined in: shared/types.ts:513
Fired when window is unmaximized
Returns
Section titled “Returns”void
onUserClose()?
Section titled “onUserClose()?”
optionalonUserClose: () =>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).
Returns
Section titled “Returns”void
opacity?
Section titled “opacity?”
optionalopacity:number
Defined in: shared/types.ts:405
Window opacity (0.0 to 1.0)
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.
persistBounds?
Section titled “persistBounds?”
optionalpersistBounds:string
Defined in: shared/types.ts:492
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:478
Recreate window when creation-only props change. Default: false (log warning instead).
resizable?
Section titled “resizable?”
optionalresizable:boolean
Defined in: shared/types.ts:417
Whether the window is resizable. Default: true.
showInactive?
Section titled “showInactive?”
optionalshowInactive:boolean
Defined in: shared/types.ts:451
Show window without stealing focus
skipTaskbar?
Section titled “skipTaskbar?”
optionalskipTaskbar:boolean
Defined in: shared/types.ts:438
Whether to skip showing in taskbar/dock.
targetDisplay?
Section titled “targetDisplay?”
optionaltargetDisplay:TargetDisplay
Defined in: shared/types.ts:470
Which display to open the window on
title?
Section titled “title?”
optionaltitle:string
Defined in: shared/types.ts:375
Window title
titleBarOverlay?
Section titled “titleBarOverlay?”
optionaltitleBarOverlay:TitleBarOverlayOptions
Defined in: shared/types.ts:465
Title bar overlay options (Windows)
titleBarStyle?
Section titled “titleBarStyle?”
optionaltitleBarStyle:TitleBarStyle
Defined in: shared/types.ts:393
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:462
Traffic light (close/minimize/maximize) button position (macOS)
x:
number
y:
number
transparent?
Section titled “transparent?”
optionaltransparent:boolean
Defined in: shared/types.ts:381
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:399
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: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.
visibleOnAllWorkspaces?
Section titled “visibleOnAllWorkspaces?”
optionalvisibleOnAllWorkspaces:boolean
Defined in: shared/types.ts:457
Visible on all workspaces/virtual desktops
width?
Section titled “width?”
optionalwidth:number
Defined in: shared/types.ts:332
Controlled width. Changes will resize the window. Use with onBoundsChange for two-way sync.
optionalx:number
Defined in: shared/types.ts:344
Controlled x position. Changes will move the window. Use with onBoundsChange for two-way sync.
optionaly:number
Defined in: shared/types.ts:350
Controlled y position. Changes will move the window. Use with onBoundsChange for two-way sync.