BaseWindowConstructorOptions Object
- widthInteger (optional) - Window's width in pixels. Default is- 800.
- heightInteger (optional) - Window's height in pixels. Default is- 600.
- xInteger (optional) - (required if y is used) Window's left offset from screen. Значение по умолчанию центрирует окно.
- yInteger (optional) - (required if x is used) Window's top offset from screen. Значение по умолчанию центрирует окно.
- useContentSizeboolean (optional) - The- widthand- heightwould be used as web page's size, which means the actual window's size will include window frame's size and be slightly larger. Default is- false.
- centerboolean (optional) - Show window in the center of the screen. Default is- false.
- minWidthInteger (optional) - Window's minimum width. Default is- 0.
- minHeightInteger (optional) - Window's minimum height. Default is- 0.
- maxWidthInteger (optional) - Window's maximum width. По умолчанию нет ограничения.
- maxHeightInteger (optional) - Window's maximum height. По умолчанию нет ограничения.
- resizableboolean (optional) - Whether window is resizable. Default is- true.
- movableboolean (optional) macOS Windows - Whether window is movable. Не реализовано в Linux. Default is- true.
- minimizableboolean (optional) macOS Windows - Whether window is minimizable. Не реализовано в Linux. Default is- true.
- maximizableboolean (optional) macOS Windows - Whether window is maximizable. Не реализовано в Linux. Default is- true.
- closableboolean (optional) macOS Windows - Whether window is closable. Не реализовано в Linux. Default is- true.
- focusableboolean (optional) - Whether the window can be focused. Default is- true. On Windows setting- focusable: falsealso implies setting- skipTaskbar: true. On Linux setting- focusable: falsemakes the window stop interacting with wm, so the window will always stay on top in all workspaces.
- alwaysOnTopboolean (optional) - Whether the window should always stay on top of other windows. Default is- false.
- fullscreenboolean (optional) - Whether the window should show in fullscreen. When explicitly set to- falsethe fullscreen button will be hidden or disabled on macOS. Default is- false.
- fullscreenableboolean (optional) - Whether the window can be put into fullscreen mode. On macOS, also whether the maximize/zoom button should toggle full screen mode or maximize window. Default is- true.
- simpleFullscreenboolean (optional) macOS - Use pre-Lion fullscreen on macOS. Default is- false.
- skipTaskbarboolean (optional) macOS Windows - Whether to show the window in taskbar. Default is- false.
- hiddenInMissionControlboolean (optional) macOS - Whether window should be hidden when the user toggles into mission control.
- kioskboolean (optional) - Whether the window is in kiosk mode. Default is- false.
- titlestring (optional) - Default window title. Default is- "Electron". If the HTML tag- <title>is defined in the HTML file loaded by- loadURL(), this property will be ignored.
- icon(NativeImage | string) (optional) - The window icon. On Windows it is recommended to use- ICOicons to get best visual effects, you can also leave it undefined so the executable's icon will be used.
- showboolean (optional) - Whether window should be shown when created. Default is- true.
- frameboolean (optional) - Specify- falseto create a frameless window. Default is- true.
- parentBaseWindow (optional) - Specify parent window. Default is- null.
- modalboolean (optional) - Whether this is a modal window. This only works when the window is a child window. Default is- false.
- acceptFirstMouseboolean (optional) macOS - Whether clicking an inactive window will also click through to the web contents. Default is- falseon macOS. This option is not configurable on other platforms.
- disableAutoHideCursorboolean (optional) - Whether to hide cursor when typing. Default is- false.
- autoHideMenuBarboolean (optional) Linux Windows - Auto hide the menu bar unless the- Altkey is pressed. Default is- false.
- enableLargerThanScreenboolean (optional) macOS - Enable the window to be resized larger than screen. Only relevant for macOS, as other OSes allow larger-than-screen windows by default. Default is- false.
- backgroundColorstring (optional) - The window's background color in Hex, RGB, RGBA, HSL, HSLA or named CSS color format. Alpha in #AARRGGBB format is supported if- transparentis set to- true. Default is- #FFF(white). See win.setBackgroundColor for more information.
- hasShadowboolean (optional) - Whether window should have a shadow. Default is- true.
- opacitynumber (optional) macOS Windows - Set the initial opacity of the window, between 0.0 (fully transparent) and 1.0 (fully opaque). This is only implemented on Windows and macOS.
- darkThemeboolean (optional) - Forces using dark theme for the window, only works on some GTK+3 desktop environments. Default is- false.
- transparentboolean (optional) - Makes the window transparent. Default is- false. В Windows не работает до тех пор, пока окно не будет без фрейма.
- typestring (optional) - The type of window, default is normal window. See more about this below.
- visualEffectStatestring (optional) macOS - Specify how the material appearance should reflect window activity state on macOS. Must be used with the- vibrancyproperty. Возможные значения:- followWindow- The backdrop should automatically appear active when the window is active, and inactive when it is not. This is the default.
- active- The backdrop should always appear active.
- inactive- The backdrop should always appear inactive.
 
- titleBarStylestring (optional) - The style of window title bar. Default is- default. Возможные значения:- default- Results in the standard title bar for macOS or Windows respectively.
- hidden- Results in a hidden title bar and a full size content window. На macOS в левом верхнем углу окна все еще есть стандартное управление окном ("светофоры"). On Windows and Linux, when combined with- titleBarOverlay: trueit will activate the Window Controls Overlay (see- titleBarOverlayfor more information), otherwise no window controls will be shown.
- hiddenInsetmacOS - Results in a hidden title bar with an alternative look where the traffic light buttons are slightly more inset from the window edge.
- customButtonsOnHovermacOS - Results in a hidden title bar and a full size content window, the traffic light buttons will display when being hovered over in the top left of the window. Note: This option is currently experimental.
 
- titleBarOverlayObject | Boolean (optional) - When using a frameless window in conjunction with- win.setWindowButtonVisibility(true)on macOS or using a- titleBarStyleso that the standard window controls ("traffic lights" on macOS) are visible, this property enables the Window Controls Overlay JavaScript APIs and CSS Environment Variables. Specifying- truewill result in an overlay with default system colors. Default is- false.- colorString (optional) Windows Linux - The CSS color of the Window Controls Overlay when enabled. Default is the system color.
- symbolColorString (optional) Windows Linux - The CSS color of the symbols on the Window Controls Overlay when enabled. Default is the system color.
- heightInteger (optional) - The height of the title bar and Window Controls Overlay in pixels. Default is system height.
 
- accentColorboolean | string (optional) Windows - The accent color for the window. By default, follows user preference in System Settings. Set to- falseto explicitly disable, or set the color in Hex, RGB, RGBA, HSL, HSLA or named CSS color format. Alpha values will be ignored.
- trafficLightPositionPoint (optional) macOS - Set a custom position for the traffic light buttons in frameless windows.
- roundedCornersboolean (optional) macOS Windows - Whether frameless window should have rounded corners. Default is- true. Setting this property to- falsewill prevent the window from being fullscreenable on macOS. On Windows versions older than Windows 11 Build 22000 this property has no effect, and frameless windows will not have rounded corners.
- thickFrameboolean (optional) Windows - Use- WS_THICKFRAMEstyle for frameless windows on Windows, which adds the standard window frame. Setting it to- falsewill remove window shadow and window animations, and disable window resizing via dragging the window edges. Default is- true.
- vibrancystring (optional) macOS - Add a type of vibrancy effect to the window, only on macOS. Can be- appearance-based,- titlebar,- selection,- menu,- popover,- sidebar,- header,- sheet,- window,- hud,- fullscreen-ui,- tooltip,- content,- under-window, or- under-page.
- backgroundMaterialstring (optional) Windows - Set the window's system-drawn background material, including behind the non-client area. Can be- auto,- none,- mica,- acrylicor- tabbed. See win.setBackgroundMaterial for more information.
- zoomToPageWidthboolean (optional) macOS - Controls the behavior on macOS when option-clicking the green stoplight button on the toolbar or by clicking the Window > Zoom menu item. If- true, the window will grow to the preferred width of the web page when zoomed,- falsewill cause it to zoom to the width of the screen. This will also affect the behavior when calling- maximize()directly. Default is- false.
- tabbingIdentifierstring (optional) macOS - Tab group name, allows opening the window as a native tab. Windows with the same tabbing identifier will be grouped together. This also adds a native new tab button to your window's tab bar and allows your- appand window to receive the- new-window-for-tabevent.
When setting minimum or maximum window size with minWidth/maxWidth/
minHeight/maxHeight, it only constrains the users. It won't prevent you from
passing a size that does not follow size constraints to setBounds/setSize or
to the constructor of BrowserWindow.
The possible values and behaviors of the type option are platform dependent.
Возможные значения:
- On Linux, possible types are desktop,dock,toolbar,splash,notification.- The desktoptype places the window at the desktop background window level (kCGDesktopWindowLevel - 1). However, note that a desktop window will not receive focus, keyboard, or mouse events. You can still use globalShortcut to receive input sparingly.
- The docktype creates a dock-like window behavior.
- The toolbartype creates a window with a toolbar appearance.
- The splashtype behaves in a specific way. It is not draggable, even if the CSS styling of the window's body contains -webkit-app-region: drag. This type is commonly used for splash screens.
- The notificationtype creates a window that behaves like a system notification.
 
- The 
- On macOS, possible types are desktop,textured,panel.- The texturedtype adds metal gradient appearance. This option is deprecated.
- The desktoptype places the window at the desktop background window level (kCGDesktopWindowLevel - 1). Note that desktop window will not receive focus, keyboard or mouse events, but you can useglobalShortcutto receive input sparingly.
- The paneltype enables the window to float on top of full-screened apps by adding theNSWindowStyleMaskNonactivatingPanelstyle mask, normally reserved for NSPanel, at runtime. Also, the window will appear on all spaces (desktops).
 
- The 
- On Windows, possible type is toolbar.