WindowOptions
Defined in: window.ts:2242
Configuration for the window to create.
1.0.0
optionalallowLinkPreview:boolean
Defined in: window.ts:2426
on macOS and iOS there is a link preview on long pressing links, this is enabled by default. see https://docs.rs/objc2-web-kit/latest/objc2_web_kit/struct.WKWebView.html#method.allowsLinkPreview
optionalalwaysOnBottom:boolean
Defined in: window.ts:2299
Whether the window should always be below other windows.
optionalalwaysOnTop:boolean
Defined in: window.ts:2297
Whether the window should always be on top of other windows or not.
optionalbackgroundColor:Color
Defined in: window.ts:2403
Set the window background color.
- Android / iOS: Unsupported.
- Windows: alpha channel is ignored.
2.1.0
optionalbackgroundThrottling:BackgroundThrottlingPolicy
Defined in: window.ts:2417
Change the default background throttling behaviour.
- Linux / Windows / Android: Unsupported. Workarounds like a pending WebLock transaction might suffice.
- iOS: Supported since version 17.0+.
- macOS: Supported since version 14.0+.
see https://github.com/tauri-apps/tauri/issues/5250#issuecomment-2569380578
2.3.0
optionalcenter:boolean
Defined in: window.ts:2244
Show window in the center of the screen..
optionalclosable:boolean
Defined in: window.ts:2358
Whether the window’s native close button is enabled or not. Defaults to true.
optionalcontentProtected:boolean
Defined in: window.ts:2301
Prevents the window contents from being captured by other apps.
optionaldecorations:boolean
Defined in: window.ts:2295
Whether the window should have borders and bars or not.
optionaldisableInputAccessoryView:boolean
Defined in: window.ts:2433
Allows disabling the input accessory view on iOS.
The accessory view is the view that appears above the keyboard when a text input element is focused. It usually displays a view with “Done”, “Next” buttons.
optionalfocus:boolean
Defined in: window.ts:2283
Whether the window will be initially focused or not.
optionalfullscreen:boolean
Defined in: window.ts:2281
Whether the window is in fullscreen mode or not.
optionalheight:number
Defined in: window.ts:2252
The initial height.
optionalhiddenTitle:boolean
Defined in: window.ts:2339
If true, sets the window title to be hidden on macOS.
optionaljavascriptDisabled:boolean
Defined in: window.ts:2421
Whether we should disable JavaScript code execution on the webview or not.
optionalmaxHeight:number
Defined in: window.ts:2260
The maximum height. Only applies if maxWidth is also set.
optionalmaximizable:boolean
Defined in: window.ts:2350
Whether the window’s native maximize button is enabled or not. Defaults to true.
optionalmaximized:boolean
Defined in: window.ts:2291
Whether the window should be maximized upon creation or not.
optionalmaxWidth:number
Defined in: window.ts:2258
The maximum width. Only applies if maxHeight is also set.
optionalminHeight:number
Defined in: window.ts:2256
The minimum height. Only applies if minWidth is also set.
optionalminimizable:boolean
Defined in: window.ts:2354
Whether the window’s native minimize button is enabled or not. Defaults to true.
optionalminWidth:number
Defined in: window.ts:2254
The minimum width. Only applies if minHeight is also set.
optionalparent:string|Window|WebviewWindow
Defined in: window.ts:2372
Sets a parent to the window to be created. Can be either a Window or a label of the window.
- Windows: This sets the passed parent as an owner window to the window to be created.
From MSDN owned windows docs:
- An owned window is always above its owner in the z-order.
- The system automatically destroys an owned window when its owner is destroyed.
- An owned window is hidden when its owner is minimized.
- Linux: This makes the new window transient for parent, see https://docs.gtk.org/gtk3/method.Window.set_transient_for.html
- macOS: This adds the window as a child of parent, see https://developer.apple.com/documentation/appkit/nswindow/1419152-addchildwindow?language=objc
optionalpreventOverflow:boolean|PreventOverflowMargin
Defined in: window.ts:2275
Prevent the window from overflowing the working area (e.g. monitor size - taskbar size)
on creation, which means the window size will be limited to monitor size - taskbar size
Can either be set to true or to a PreventOverflowMargin object to set an additional margin
that should be considered to determine the working area
(in this case the window size will be limited to monitor size - taskbar size - margin)
NOTE: The overflow check is only performed on window creation, resizes can still overflow
- iOS / Android: Unsupported.
optionalresizable:boolean
Defined in: window.ts:2277
Whether the window is resizable or not.
optionalshadow:boolean
Defined in: window.ts:2317
Whether or not the window has shadow.
- Windows:
falsehas no effect on decorated window, shadows are always ON.truewill make undecorated window have a 1px white border, and on Windows 11, it will have a rounded corners.
- Linux: Unsupported.
2.0.0
optionalskipTaskbar:boolean
Defined in: window.ts:2303
Whether or not the window icon should be added to the taskbar.
optionaltabbingIdentifier:string
Defined in: window.ts:2346
Defines the window tabbing identifier on macOS.
Windows with the same tabbing identifier will be grouped together. If the tabbing identifier is not set, automatic tabbing will be disabled.
optionaltheme:Theme
Defined in: window.ts:2323
The initial window theme. Defaults to the system theme.
Only implemented on Windows and macOS 10.14+.
optionaltitle:string
Defined in: window.ts:2279
Window title.
optionaltitleBarStyle:TitleBarStyle
Defined in: window.ts:2327
The style of the macOS title bar.
optionaltrafficLightPosition:LogicalPosition
Defined in: window.ts:2335
The position of the window controls on macOS.
Requires titleBarStyle: 'overlay' and decorations: true.
2.4.0
optionaltransparent:boolean
Defined in: window.ts:2289
Whether the window is transparent or not.
Note that on macOS this requires the macos-private-api feature flag, enabled under tauri.conf.json > app > macOSPrivateApi.
WARNING: Using private APIs on macOS prevents your application from being accepted to the App Store.
optionalvisible:boolean
Defined in: window.ts:2293
Whether the window should be immediately visible upon creation or not.
optionalvisibleOnAllWorkspaces:boolean
Defined in: window.ts:2381
Whether the window should be visible on all workspaces or virtual desktops.
- Windows / iOS / Android: Unsupported.
2.0.0
optionalwidth:number
Defined in: window.ts:2250
The initial width.
optionalwindowEffects:Effects
Defined in: window.ts:2392
Window effects.
Requires the window to be transparent.
- Windows: If using decorations or shadows, you may want to try this workaround https://github.com/tauri-apps/tao/issues/72#issuecomment-975607891
- Linux: Unsupported
optionalx:number
Defined in: window.ts:2246
The initial vertical position. Only applies if y is also set.
optionaly:number
Defined in: window.ts:2248
The initial horizontal position. Only applies if x is also set.
© 2025 Tauri Contributors. CC-BY / MIT