| Crates.io | window-vibrancy |
| lib.rs | window-vibrancy |
| version | 0.6.0 |
| created_at | 2022-03-05 17:00:58.881997+00 |
| updated_at | 2025-02-21 15:29:35.525231+00 |
| description | Make your windows vibrant. |
| homepage | |
| repository | https://github.com/tauri-apps/tauri-plugin-vibrancy |
| max_upload_size | |
| id | 544124 |
| size | 1,512,413 |
Make your windows vibrant.
[!Tip] If you're using
tauri@v1, you need to use version0.4of 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");
if you are using tauri, don't forget to:
html, body { background: transparent } see index.html#L12"windows": [ { "transparent": true } ] see tauri.conf.json#L57"macOSPrivateApi": true see tauri.conf.json#L49For a more complete example of usage with tauri, see examples/tauri.
| Function | Supported platforms | Notes |
|---|---|---|
apply_blur&clear_blur |
Windows 7/10/11 (22H1 only) | Bad performance when resizing/dragging the window on Windows 11 build 22621+. |
apply_acrylic&clear_acrylic |
Windows 10/11 | Bad performance when resizing/dragging the window on Windows 10 v1903+ and Windows 11 build 22000. |
apply_mica&clear_mica |
Windows 11 | |
apply_vibrancy&clear_vibrancy |
macOS 10.10 and newer |
| apply_blur | apply_acrylic | apply_mica | apply_vibrancy |
|---|---|---|---|
![]() |
![]() |
![]() |
![]() |