Use window-vibrancy to apply platform-specific visual effects like blur, acrylic, mica, or vibrancy to your application windows.
Platform Support:
- Windows: Supports
apply_blur, apply_acrylic, and apply_mica. - macOS: Supports
apply_vibrancy (macOS 10.10+) and apply_liquid_glass (macOS 26+). - Linux: Not supported; effects are managed by the system compositor.
Important Version Note:
If you are using tauri@v1, you must use version 0.4 of this crate.
use window_vibrancy::{apply_blur, apply_vibrancy, NSVisualEffectMaterial};
#[cfg(target_os = "macos")]
apply_vibrancy(&window, NSVisualEffectMaterial::HudWindow, None, None)
.expect("Unsupported platform! 'apply_vibrancy' is only supported on macOS");
#[cfg(target_os = "windows")]
apply_blur(&window, Some((18, 18, 18, 125)))
.expect("Unsupported platform! 'apply_blur' is only supported on Windows");