WindowOptions
이 콘텐츠는 아직 번역되지 않았습니다.
Module @netwiv/api/window · Kind Interface
import { WindowOptions } from '@netwiv/api/window';Members
Section titled “Members”allowLinkPreview?
Section titled “allowLinkPreview?”allowLinkPreview?: boolean | undefinedon 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
alwaysOnBottom?
Section titled “alwaysOnBottom?”alwaysOnBottom?: boolean | undefinedWhether the window should always be below other windows.
alwaysOnTop?
Section titled “alwaysOnTop?”alwaysOnTop?: boolean | undefinedWhether the window should always be on top of other windows or not.
backgroundColor?
Section titled “backgroundColor?”backgroundColor?: Color | undefinedSet the window background color.
Platform-specific:
Section titled “Platform-specific:”- Android / iOS: Unsupported.
- Windows: alpha channel is ignored.
backgroundThrottling?
Section titled “backgroundThrottling?”backgroundThrottling?: BackgroundThrottlingPolicy | undefinedChange the default background throttling behaviour.
Platform-specific
Section titled “Platform-specific”- 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
center?
Section titled “center?”center?: boolean | undefinedShow window in the center of the screen..
closable?
Section titled “closable?”closable?: boolean | undefinedWhether the window’s native close button is enabled or not. Defaults to true.
contentProtected?
Section titled “contentProtected?”contentProtected?: boolean | undefinedPrevents the window contents from being captured by other apps.
decorations?
Section titled “decorations?”decorations?: boolean | undefinedWhether the window should have borders and bars or not.
focus?
Section titled “focus?”focus?: boolean | undefinedWhether the window will be initially focused or not.
focusable?
Section titled “focusable?”focusable?: boolean | undefinedWhether the window can be focused or not.
fullscreen?
Section titled “fullscreen?”fullscreen?: boolean | undefinedWhether the window is in fullscreen mode or not.
height?
Section titled “height?”height?: number | undefinedThe initial height in logical pixels.
hiddenTitle?
Section titled “hiddenTitle?”hiddenTitle?: boolean | undefinedIf true, sets the window title to be hidden on macOS.
javascriptDisabled?
Section titled “javascriptDisabled?”javascriptDisabled?: boolean | undefinedWhether we should disable JavaScript code execution on the webview or not.
maxHeight?
Section titled “maxHeight?”maxHeight?: number | undefinedThe maximum height in logical pixels. Only applies if maxWidth is also set.
maximizable?
Section titled “maximizable?”maximizable?: boolean | undefinedWhether the window’s native maximize button is enabled or not. Defaults to true.
maximized?
Section titled “maximized?”maximized?: boolean | undefinedWhether the window should be maximized upon creation or not.
maxWidth?
Section titled “maxWidth?”maxWidth?: number | undefinedThe maximum width in logical pixels. Only applies if maxHeight is also set.
minHeight?
Section titled “minHeight?”minHeight?: number | undefinedThe minimum height in logical pixels. Only applies if minWidth is also set.
minimizable?
Section titled “minimizable?”minimizable?: boolean | undefinedWhether the window’s native minimize button is enabled or not. Defaults to true.
minWidth?
Section titled “minWidth?”minWidth?: number | undefinedThe minimum width in logical pixels. Only applies if minHeight is also set.
parent?
Section titled “parent?”parent?: string | Window | WebviewWindow | undefinedpreventOverflow?
Section titled “preventOverflow?”preventOverflow?: boolean | PreventOverflowMargin | undefinedPrevent 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 {@link 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
Platform-specific
Section titled “Platform-specific”- iOS / Android: Unsupported.
resizable?
Section titled “resizable?”resizable?: boolean | undefinedWhether the window is resizable or not.
scrollBarStyle?
Section titled “scrollBarStyle?”scrollBarStyle?: ScrollBarStyle | undefinedSpecifies the native scrollbar style to use with the webview. CSS styles that modify the scrollbar are applied on top of the native appearance configured here.
Defaults to default, which is the browser default.
Platform-specific
Section titled “Platform-specific”- Windows:
fluentOverlayrequires WebView2 Runtime version 125.0.2535.41 or higher, and does nothing on older versions.- This option must be given the same value for all webviews.
- Linux / Android / iOS / macOS: Unsupported. Only supports
Defaultand performs no operation.
shadow?
Section titled “shadow?”shadow?: boolean | undefinedWhether or not the window has shadow.
Platform-specific
Section titled “Platform-specific”- 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.
skipTaskbar?
Section titled “skipTaskbar?”skipTaskbar?: boolean | undefinedWhether or not the window icon should be added to the taskbar.
tabbingIdentifier?
Section titled “tabbingIdentifier?”tabbingIdentifier?: string | undefinedDefines 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.
theme?
Section titled “theme?”theme?: Theme | undefinedThe initial window theme. Defaults to the system theme.
Only implemented on Windows and macOS 10.14+.
title?
Section titled “title?”title?: string | undefinedWindow title.
titleBarStyle?
Section titled “titleBarStyle?”titleBarStyle?: TitleBarStyle | undefinedThe style of the macOS title bar.
trafficLightPosition?
Section titled “trafficLightPosition?”trafficLightPosition?: LogicalPosition | undefinedThe position of the window controls on macOS.
Requires titleBarStyle: 'overlay' and decorations: true.
transparent?
Section titled “transparent?”transparent?: boolean | undefinedWhether 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.
visible?
Section titled “visible?”visible?: boolean | undefinedWhether the window should be immediately visible upon creation or not.
visibleOnAllWorkspaces?
Section titled “visibleOnAllWorkspaces?”visibleOnAllWorkspaces?: boolean | undefinedWhether the window should be visible on all workspaces or virtual desktops.
Platform-specific
Section titled “Platform-specific”- Windows / iOS / Android: Unsupported.
width?
Section titled “width?”width?: number | undefinedThe initial width in logical pixels.
windowEffects?
Section titled “windowEffects?”windowEffects?: Effects | undefinedWindow effects.
Requires the window to be transparent.
Platform-specific:
Section titled “Platform-specific:”- 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
x?: number | undefinedThe initial vertical position in logical pixels. Only applies if y is also set.
y?: number | undefinedThe initial horizontal position in logical pixels. Only applies if x is also set.
Descriptions come from the pinned @tauri-apps/api@2.11.1 declarations (MIT OR Apache-2.0); imports are shown with @netwiv/api paths.