// the find
chrisbanes/haze
Background blurring for Compose Multiplatform / Jetpack Compose
Haze provides blur and 'liquid glass' style visual effects for Compose Multiplatform, covering Android, iOS, macOS, Desktop, and Wasm/JS. It's for anyone building a Compose UI that wants frosted-glass panels, nav bars, or dialogs without hand-rolling per-platform RenderEffect/shader code.
Real per-platform backends instead of one lowest-common-denominator implementation — Android uses RenderEffect with a RenderScript fallback, skiko targets get their own runtime shader path, so blur quality doesn't get capped by whatever the weakest platform can do. Test suite goes well beyond unit tests: instrumentation tests for backdrop capture, resize, and reattachment, recomposition-count/loop tests, and even a selection leak test — someone has clearly been bitten by Compose lifecycle bugs before and is guarding against regressions. ADRs (0001–0010) document real tradeoffs like the shared retained stage graph and cadence-weighted input scaling, which is unusually transparent for a visual-effects library and useful if you need to reason about perf. Artifacts are split (haze-blur, haze-glass, material3 integrations) so you're not pulling in the experimental Glass renderer just to get a blur.
Haze 2.0 is beta and an intentional source break from 1.x (see ADR 0001) — if you're on 1.x, budget real migration time, and the 2.0 API can still shift before it's final. Glass is explicitly experimental and gated behind an opt-in annotation, so it's not something to ship in production UI yet despite being half the README's pitch. Camera and platform-view blurring has sharp edges: CameraX needs COMPATIBLE mode specifically, and a plain SurfaceView can't be captured at all — easy to hit a silent no-op if you're blurring over video. Performance is explicitly device-dependent enough that the docs tell you to benchmark a release build on real hardware before picking a mode, which means the 'Balanced' default is a guess, not a guarantee, for your target devices.