Skip to content

Overview

Haze is a library providing a 'glassmorphism' style blur for Compose.

Haze is built with Compose Multiplatform, meaning that it supports different platforms:

Platform Supported
Android
Desktop (JVM)
iOS
Wasm
JS/Canvas

You can also see it in action in the Tivi app:

Versions

There are currently 2 different versions available: 0.7.x (stable) and 0.9.x (pre-release).

The 0.9.x release depends on Compose Multiplatform 1.7.0, currently pre-release, meaning that we need to wait for that to go stable before Haze can go stable. The 0.9.x release also contains a near full re-write of how Haze works underneath. More information can be found on the Migrating to 0.9 page.

Download

Maven Central

repositories {
    mavenCentral()
}

dependencies {
    implementation("dev.chrisbanes.haze:haze:<version>")
}

Acknowledgements

In previous versions, the Skia-backed implementation (used on iOS and Desktop) is heavily influenced by Kirill Grouchnikov's explorations on Compose Desktop. He wrote about it in his Shader based render effects in Compose Desktop with Skia blog post.

The Android implementation is inspired by the techniques documented by Chet Haase and Nader Jawad in the RenderNode for Bigger, Better Blurs blog post.

Thank you all.

License

Copyright 2023 Chris Banes

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.