{"id":36983234,"url":"https://github.com/hkandala/tauri-plugin-liquid-glass","last_synced_at":"2026-01-13T22:56:00.990Z","repository":{"id":329264402,"uuid":"1117886957","full_name":"hkandala/tauri-plugin-liquid-glass","owner":"hkandala","description":"macOS 26+ Liquid Glass support for Tauri v2","archived":false,"fork":false,"pushed_at":"2025-12-18T10:55:00.000Z","size":12179,"stargazers_count":19,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-13T22:55:42.548Z","etag":null,"topics":["liquid-glass","macos26","tauri-apps","tauri-plugin"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hkandala.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2025-12-17T00:49:14.000Z","updated_at":"2026-01-10T13:49:43.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/hkandala/tauri-plugin-liquid-glass","commit_stats":null,"previous_names":["hkandala/tauri-plugin-liquid-glass"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/hkandala/tauri-plugin-liquid-glass","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hkandala%2Ftauri-plugin-liquid-glass","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hkandala%2Ftauri-plugin-liquid-glass/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hkandala%2Ftauri-plugin-liquid-glass/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hkandala%2Ftauri-plugin-liquid-glass/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hkandala","download_url":"https://codeload.github.com/hkandala/tauri-plugin-liquid-glass/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hkandala%2Ftauri-plugin-liquid-glass/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28405139,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-13T21:51:37.118Z","status":"ssl_error","status_checked_at":"2026-01-13T21:45:14.585Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["liquid-glass","macos26","tauri-apps","tauri-plugin"],"created_at":"2026-01-13T22:56:00.802Z","updated_at":"2026-01-13T22:56:00.977Z","avatar_url":"https://github.com/hkandala.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tauri-plugin-liquid-glass\n\n![Demo GIF](https://raw.githubusercontent.com/hkandala/tauri-plugin-liquid-glass/refs/heads/main/.github/demo.gif)\n\nmacOS 26+ Liquid Glass effect support for Tauri v2 applications.\n\nThis plugin provides native macOS Liquid Glass effects using the private `NSGlassEffectView` API available in macOS 26 (Tahoe) and later. On older macOS versions, it falls back to `NSVisualEffectView`.\n\n## Features\n\n- Native macOS 26+ Liquid Glass effect\n- Graceful fallback to `NSVisualEffectView` on older macOS\n- 24 material variants (experimental)\n- Configurable corner radius and tint color\n- Single unified API with automatic window state management\n- Safe no-op on non-macOS platforms\n\n## Requirements\n\n- Tauri v2.0+\n- macOS 26+ for Liquid Glass effect (falls back to vibrancy on older versions)\n\n## Installation\n\n### Rust\n\nAdd the plugin to your `Cargo.toml`:\n\n```toml\n[dependencies]\ntauri-plugin-liquid-glass = \"0.1\"\n```\n\n### JavaScript/TypeScript\n\n```bash\nnpm install tauri-plugin-liquid-glass-api\n# or\nyarn add tauri-plugin-liquid-glass-api\n# or\npnpm add tauri-plugin-liquid-glass-api\n```\n\n## Setup\n\n### 1. Register the plugin in your Tauri app\n\n```rust\n// src-tauri/src/lib.rs\npub fn run() {\n    tauri::Builder::default()\n        .plugin(tauri_plugin_liquid_glass::init())\n        .run(tauri::generate_context!())\n        .expect(\"error while running tauri application\");\n}\n```\n\n### 2. Configure permissions\n\nAdd the plugin permissions to your capability file:\n\n```json\n// src-tauri/capabilities/default.json\n{\n  \"identifier\": \"default\",\n  \"windows\": [\"main\"],\n  \"permissions\": [\n    \"core:default\",\n    \"liquid-glass:default\"\n  ]\n}\n```\n\n### 3. Enable transparent window\n\nIn your `tauri.conf.json`, enable macOS private API and window transparency:\n\n```json\n{\n  \"app\": {\n    \"macOSPrivateApi\": true,\n    \"windows\": [\n      {\n        \"transparent\": true,\n      }\n    ]\n  }\n}\n```\n\nAnd in your HTML/CSS:\n\n```css\nhtml, body {\n  background: transparent;\n}\n```\n\n## Usage\n\n### TypeScript API\n\nThe current window is automatically detected using Tauri's `getCurrentWindow()`.\n\n```typescript\nimport {\n  isGlassSupported,\n  setLiquidGlassEffect,\n  GlassMaterialVariant,\n} from \"tauri-plugin-liquid-glass-api\";\n\n// Check if liquid glass (NSGlassEffectView) is supported\nconst supported = await isGlassSupported();\n\n// Enable with default settings\nawait setLiquidGlassEffect({});\n\n// Enable with custom settings\nawait setLiquidGlassEffect({\n  cornerRadius: 24,\n  tintColor: \"#ffffff20\",\n  variant: GlassMaterialVariant.Sidebar,\n});\n\n// Disable glass effect\nawait setLiquidGlassEffect({ enabled: false });\n```\n\n### Rust API\n\nThe plugin exposes a Rust API via the `LiquidGlassExt` extension trait:\n\n```rust\nuse tauri_plugin_liquid_glass::{LiquidGlassExt, LiquidGlassConfig, GlassMaterialVariant};\n\n// In a Tauri command or setup hook:\n#[tauri::command]\nfn apply_glass(app: tauri::AppHandle, window: tauri::WebviewWindow) -\u003e Result\u003c(), String\u003e {\n    // Check if liquid glass is supported\n    let supported = app.liquid_glass().is_supported();\n\n    // Enable with default settings\n    app.liquid_glass()\n        .set_effect(\u0026window, LiquidGlassConfig::default())\n        .map_err(|e| e.to_string())?;\n\n    // Enable with custom settings\n    app.liquid_glass()\n        .set_effect(\u0026window, LiquidGlassConfig {\n            corner_radius: 24.0,\n            tint_color: Some(\"#ffffff20\".into()),\n            variant: GlassMaterialVariant::Sidebar,\n            ..Default::default()\n        })\n        .map_err(|e| e.to_string())?;\n\n    // Disable glass effect\n    app.liquid_glass()\n        .set_effect(\u0026window, LiquidGlassConfig {\n            enabled: false,\n            ..Default::default()\n        })\n        .map_err(|e| e.to_string())?;\n\n    Ok(())\n}\n```\n\n## API Reference\n\n### Functions\n\n| Function | Description |\n|----------|-------------|\n| `isGlassSupported()` | Returns `true` if running on macOS 26+ with NSGlassEffectView available |\n| `setLiquidGlassEffect(config)` | Apply, update, or remove glass effect on the current window |\n\n### LiquidGlassConfig\n\n```typescript\ninterface LiquidGlassConfig {\n  /** Whether the glass effect is enabled (default: true) */\n  enabled?: boolean;\n  /** Corner radius for the glass view in pixels (default: 0) */\n  cornerRadius?: number;\n  /** Tint color in hex format (#RRGGBB or #RRGGBBAA) */\n  tintColor?: string;\n  /** Glass material variant - experimental, macOS 26+ only (default: Regular) */\n  variant?: GlassMaterialVariant;\n}\n```\n\n### GlassMaterialVariant\n\n24 available variants (macOS 26+ only, ignored on fallback):\n\n| Value | Variant |\n|-------|---------|\n| 0 | `Regular` |\n| 1 | `Clear` |\n| 2 | `Dock` |\n| 3 | `AppIcons` |\n| 4 | `Widgets` |\n| 5 | `Text` |\n| 6 | `Avplayer` |\n| 7 | `Facetime` |\n| 8 | `ControlCenter` |\n| 9 | `NotificationCenter` |\n| 10 | `Monogram` |\n| 11 | `Bubbles` |\n| 12 | `Identity` |\n| 13 | `FocusBorder` |\n| 14 | `FocusPlatter` |\n| 15 | `Keyboard` |\n| 16 | `Sidebar` |\n| 17 | `AbuttedSidebar` |\n| 18 | `Inspector` |\n| 19 | `Control` |\n| 20 | `Loupe` |\n| 21 | `Slider` |\n| 22 | `Camera` |\n| 23 | `CartouchePopover` |\n\n## Example\n\nSee the [examples/liquid-glass-app](./examples/liquid-glass-app) directory for a complete example application.\n\nTo run the example:\n\n```bash\ncd examples/liquid-glass-app\npnpm install\npnpm tauri dev\n```\n\n## Platform Support\n\n| Platform | Support |\n|----------|---------|\n| macOS 26+ | Full Liquid Glass effect with all variants |\n| macOS 10.10-25 | Fallback to NSVisualEffectView (variants ignored) |\n| Windows | No-op (safe to call) |\n| Linux | No-op (safe to call) |\n\n## How It Works\n\n1. **macOS 26+**: Uses the private `NSGlassEffectView` API which provides the native Liquid Glass effect with material variants and tint color support.\n\n2. **macOS 10.10-25**: Falls back to `NSVisualEffectView` with `UnderWindowBackground` material. Tint colors are simulated using an overlay subview. Variants are ignored.\n\n3. **Other platforms**: All API calls are safe no-ops that succeed silently.\n\n## Notes\n\n- **Private API**: This plugin uses Apple's private `NSGlassEffectView` API, which is not officially documented and may change in future macOS versions.\n- **App Store**: Using private APIs may affect App Store approval. Consider using only the fallback `NSVisualEffectView` for production apps.\n- **Thread Safety**: All native operations are automatically dispatched to the main thread.\n- **State Management**: The plugin automatically manages glass effect state per window. Calling `setLiquidGlassEffect` on a window that already has a glass effect will update the existing effect.\n\n## Credits\n\nInspired by [electron-liquid-glass](https://github.com/Meridius-Labs/electron-liquid-glass/) by Meridius Labs.\n\n## License\n\nMIT License - see [LICENSE](./LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhkandala%2Ftauri-plugin-liquid-glass","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhkandala%2Ftauri-plugin-liquid-glass","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhkandala%2Ftauri-plugin-liquid-glass/lists"}