Add Tauri Native Window Effects
Implement a native operating-system material behind a transparent Tauri
WebView. Treat the result as one rendering stack: the native effect,
transparent window, transparent WebView ancestors, and intentionally opaque
content panes must all agree.
Read the relevant references
Read the shared rendering stack before
editing any target. Then read only the platform reference that applies:
- macOS effects for AppKit vibrancy or Liquid
Glass.
- Windows effects for Mica or Acrylic.
Use their snippets as baselines, then adapt crate and framework APIs to the
versions already installed in the target repository.
Establish the constraints
- Inspect the Tauri, WebView, frontend, Tailwind, and native-effect versions,
plus the minimum supported operating-system versions.
- Identify which surfaces should reveal native material and which must remain
opaque. Prefer a transparent shell with explicit opaque content panes.
- Choose the platform material deliberately. Do not present macOS vibrancy,
Liquid Glass, Windows Mica, and Acrylic as interchangeable visual systems.
- Preserve unsupported platforms with an opaque, readable fallback.
- Check repository rules before launching a GUI. Ask before opening or
activating the app unless the user already authorized it.
Choose one native effect owner
The supported recipe uses runtime window-vibrancy ownership and its
activation result. Never stack it with static windowEffects on the same
window. Follow the shared reference's migration steps for an existing static
owner; static configuration alone cannot satisfy the activation gate.
Gate transparency on real activation
Keep the normal application background until the native effect reports
success. Let the native layer return the activated effect name or no effect;
set a data-native-window-effect marker only for a real effect.
Use isTauri() only to distinguish a Tauri WebView from a normal browser. It
does not identify macOS or Windows and must not authorize transparency by
itself. On errors or unsupported platforms, leave the marker absent and keep
the interface opaque.
Route each platform
- On macOS, prefer semantic AppKit vibrancy such as Sidebar for the classic
path. Treat macOS 26 Liquid Glass as a separate, version-gated path.
- On Windows 11, prefer Mica for a persistent application or navigation
backdrop. Use Acrylic only when genuine see-through frosted glass is wanted
and its power and resizing costs are acceptable. Do not silently fall back
from Mica to Acrylic.
- On Linux, keep an opaque fallback. Native desktop blur is compositor-owned
and is outside the portable Tauri baseline. Investigate a compositor-specific
implementation only when the user explicitly requests that target.
Implement the complete stack
- Configure target-specific dependencies and window settings.
- Apply the selected effect to the real Tauri WebView window.
- Return an activation result that distinguishes success from unsupported or
failed activation.
- Make
html, body, the root node, and every shell ancestor above the
material region transparent only after success.
- Keep ordinary content panes explicitly opaque.
- Keep permanent transparency overrides outside Tailwind cascade layers.
Do not substitute CSS backdrop-filter for a native window material. It only
filters content inside the WebView and cannot reveal the desktop behind the
native window.
Validate the result
- Run frontend tests, type checking, linting, and a production build.
- Run Rust formatting, tests, and clippy for the Tauri crate.
- Compile every supported platform path in CI when available.
- Inspect light, dark, high-contrast, and disabled-transparency fallbacks.
- Confirm opaque content, scrolling, titlebar drag regions, and controls still
work.
- Remove diagnostic styles, commands, timers, and logging before finishing.
After two failed hypotheses, return to the native activation result and
computed backgrounds instead of adding more blur, opacity, or fallback layers.
1---2name: add-tauri-native-window-effects3description: Add and debug native window materials in Tauri 2 desktop apps on macOS and Windows. Use when implementing macOS vibrancy or Liquid Glass, Windows Mica or Acrylic, a translucent sidebar or titlebar, transparent WebView content, platform-specific opaque fallbacks, or diagnosing a native effect hidden behind gray, white, black, Canvas, or other opaque frontend backgrounds.4---56# Add Tauri Native Window Effects78Implement a native operating-system material behind a transparent Tauri9WebView. Treat the result as one rendering stack: the native effect,10transparent window, transparent WebView ancestors, and intentionally opaque11content panes must all agree.1213## Read the relevant references1415Read [the shared rendering stack](references/shared-transparency.md) before16editing any target. Then read only the platform reference that applies:1718- [macOS effects](references/macos-effects.md) for AppKit vibrancy or Liquid19 Glass.20- [Windows effects](references/windows-effects.md) for Mica or Acrylic.2122Use their snippets as baselines, then adapt crate and framework APIs to the23versions already installed in the target repository.2425## Establish the constraints26271. Inspect the Tauri, WebView, frontend, Tailwind, and native-effect versions,28 plus the minimum supported operating-system versions.292. Identify which surfaces should reveal native material and which must remain30 opaque. Prefer a transparent shell with explicit opaque content panes.313. Choose the platform material deliberately. Do not present macOS vibrancy,32 Liquid Glass, Windows Mica, and Acrylic as interchangeable visual systems.334. Preserve unsupported platforms with an opaque, readable fallback.345. Check repository rules before launching a GUI. Ask before opening or35 activating the app unless the user already authorized it.3637## Choose one native effect owner3839The supported recipe uses runtime `window-vibrancy` ownership and its40activation result. Never stack it with static `windowEffects` on the same41window. Follow the shared reference's migration steps for an existing static42owner; static configuration alone cannot satisfy the activation gate.4344## Gate transparency on real activation4546Keep the normal application background until the native effect reports47success. Let the native layer return the activated effect name or no effect;48set a `data-native-window-effect` marker only for a real effect.4950Use `isTauri()` only to distinguish a Tauri WebView from a normal browser. It51does not identify macOS or Windows and must not authorize transparency by52itself. On errors or unsupported platforms, leave the marker absent and keep53the interface opaque.5455## Route each platform5657- On macOS, prefer semantic AppKit vibrancy such as Sidebar for the classic58 path. Treat macOS 26 Liquid Glass as a separate, version-gated path.59- On Windows 11, prefer Mica for a persistent application or navigation60 backdrop. Use Acrylic only when genuine see-through frosted glass is wanted61 and its power and resizing costs are acceptable. Do not silently fall back62 from Mica to Acrylic.63- On Linux, keep an opaque fallback. Native desktop blur is compositor-owned64 and is outside the portable Tauri baseline. Investigate a compositor-specific65 implementation only when the user explicitly requests that target.6667## Implement the complete stack68691. Configure target-specific dependencies and window settings.702. Apply the selected effect to the real Tauri WebView window.713. Return an activation result that distinguishes success from unsupported or72 failed activation.734. Make `html`, `body`, the root node, and every shell ancestor above the74 material region transparent only after success.755. Keep ordinary content panes explicitly opaque.766. Keep permanent transparency overrides outside Tailwind cascade layers.7778Do not substitute CSS `backdrop-filter` for a native window material. It only79filters content inside the WebView and cannot reveal the desktop behind the80native window.8182## Validate the result8384- Run frontend tests, type checking, linting, and a production build.85- Run Rust formatting, tests, and clippy for the Tauri crate.86- Compile every supported platform path in CI when available.87- Inspect light, dark, high-contrast, and disabled-transparency fallbacks.88- Confirm opaque content, scrolling, titlebar drag regions, and controls still89 work.90- Remove diagnostic styles, commands, timers, and logging before finishing.9192After two failed hypotheses, return to the native activation result and93computed backgrounds instead of adding more blur, opacity, or fallback layers.