Skip to content
Tauri

WindowOptions

Defined in: window.ts:2242

Configuration for the window to create.

1.0.0

optional allowLinkPreview: 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


optional alwaysOnBottom: boolean

Defined in: window.ts:2299

Whether the window should always be below other windows.


optional alwaysOnTop: boolean

Defined in: window.ts:2297

Whether the window should always be on top of other windows or not.


optional backgroundColor: Color

Defined in: window.ts:2403

Set the window background color.

  • Android / iOS: Unsupported.
  • Windows: alpha channel is ignored.

2.1.0


optional backgroundThrottling: 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


optional center: boolean

Defined in: window.ts:2244

Show window in the center of the screen..


optional closable: boolean

Defined in: window.ts:2358

Whether the window’s native close button is enabled or not. Defaults to true.


optional contentProtected: boolean

Defined in: window.ts:2301

Prevents the window contents from being captured by other apps.


optional decorations: boolean

Defined in: window.ts:2295

Whether the window should have borders and bars or not.


optional disableInputAccessoryView: 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.


optional focus: boolean

Defined in: window.ts:2283

Whether the window will be initially focused or not.


optional fullscreen: boolean

Defined in: window.ts:2281

Whether the window is in fullscreen mode or not.


optional height: number

Defined in: window.ts:2252

The initial height.


optional hiddenTitle: boolean

Defined in: window.ts:2339

If true, sets the window title to be hidden on macOS.


optional javascriptDisabled: boolean

Defined in: window.ts:2421

Whether we should disable JavaScript code execution on the webview or not.


optional maxHeight: number

Defined in: window.ts:2260

The maximum height. Only applies if maxWidth is also set.


optional maximizable: boolean

Defined in: window.ts:2350

Whether the window’s native maximize button is enabled or not. Defaults to true.


optional maximized: boolean

Defined in: window.ts:2291

Whether the window should be maximized upon creation or not.


optional maxWidth: number

Defined in: window.ts:2258

The maximum width. Only applies if maxHeight is also set.


optional minHeight: number

Defined in: window.ts:2256

The minimum height. Only applies if minWidth is also set.


optional minimizable: boolean

Defined in: window.ts:2354

Whether the window’s native minimize button is enabled or not. Defaults to true.


optional minWidth: number

Defined in: window.ts:2254

The minimum width. Only applies if minHeight is also set.


optional parent: 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.


optional preventOverflow: 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.

optional resizable: boolean

Defined in: window.ts:2277

Whether the window is resizable or not.


optional shadow: boolean

Defined in: window.ts:2317

Whether or not the window has shadow.

  • Windows:
    • false has no effect on decorated window, shadows are always ON.
    • true will make undecorated window have a 1px white border, and on Windows 11, it will have a rounded corners.
  • Linux: Unsupported.

2.0.0


optional skipTaskbar: boolean

Defined in: window.ts:2303

Whether or not the window icon should be added to the taskbar.


optional tabbingIdentifier: 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.


optional theme: Theme

Defined in: window.ts:2323

The initial window theme. Defaults to the system theme.

Only implemented on Windows and macOS 10.14+.


optional title: string

Defined in: window.ts:2279

Window title.


optional titleBarStyle: TitleBarStyle

Defined in: window.ts:2327

The style of the macOS title bar.


optional trafficLightPosition: LogicalPosition

Defined in: window.ts:2335

The position of the window controls on macOS.

Requires titleBarStyle: 'overlay' and decorations: true.

2.4.0


optional transparent: 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.


optional visible: boolean

Defined in: window.ts:2293

Whether the window should be immediately visible upon creation or not.


optional visibleOnAllWorkspaces: 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


optional width: number

Defined in: window.ts:2250

The initial width.


optional windowEffects: Effects

Defined in: window.ts:2392

Window effects.

Requires the window to be transparent.


optional x: number

Defined in: window.ts:2246

The initial vertical position. Only applies if y is also set.


optional y: number

Defined in: window.ts:2248

The initial horizontal position. Only applies if x is also set.


© 2025 Tauri Contributors. CC-BY / MIT