This is an experimental version (0.1.0) of Liquid Glass Compose Library!
You can download this version via the Releases tab.
If the community shows real interest, the plan is to build a full-featured design system with optimized glassmorphism components.
If you like the idea — star the repo and follow the updates! ⭐
Glass morphism effects demonstration project in Jetpack Compose with support for Android API 21+.

- ✨ Realistic glass morphism effects
- 📱 Support for Android API 21+ (Android 5.0 and above)
- 🔄 Automatic fallback for older Android versions
- 🎨 Real-time customizable parameters
- 🚀 High performance using AGSL shaders
- Full support with AGSL shaders
- All effects work at hardware level
- Maximum performance
- Fallback implementation using standard Compose modifiers
- Glass effect simulation using gradients and transparency
- No blur support (blur only available with AGSL shaders)
liquid-glass-compose/
├── app/ # Demo application
│ └── src/main/java/
│ └── com/mrtdk/liquid_glass/
│ └── MainActivity.kt
└── glass/ # Glass library
├── build.gradle.kts
├── README.md # Library documentation
└── src/main/java/
└── com/mrtdk/glass/
└── GlassBox.kt
GlassContainer(
modifier = Modifier.fillMaxSize(),
content = {
// Your main content (background of glass)
Image(...)
}
) {
GlassBox(
modifier = Modifier
.size(200.dp)
.align(Alignment.Center),
blur = 0.5f,
scale = 0.3f,
shape = RoundedCornerShape(16.dp)
) {
Text("Glass Effect")
}
}blur(0.0-1.0) - Blur intensityscale(0.0-1.0) - Magnification/lens effectcenterDistortion(0.0-1.0) - Lens distortion (like fisheye)elevation- Shadowtint- Glass color tintdarkness(0.0-1.0) - Edge darkeningwarpEdges(0.0-1.0) - Edges distortion
# Build library
./gradlew :glass:build
# Build demo app
./gradlew :app:build
# Run application
./gradlew :app:installDebugTry the interactive demo app included in this repository! The demo lets you:
- See real-time glass morphism effects on cards and buttons
- Experiment with all parameters: blur, scale, distortion, elevation, tint, darkness, warp edges
- Instantly preview changes and rendering modes (AGSL or fallback)
- Uses
RuntimeShaderwith custom AGSL code - GPU hardware acceleration
- Support for up to 10 glass elements simultaneously in one GlassContainer
- Realistic effects: blur, distortion, shadows, reflections
- Gradient backgrounds to simulate glass
- No blur support (blur only works with AGSL shaders)
- Transparency and scaling effects
- Android API 21+ (Android 5.0)
- Jetpack Compose BOM 2024.09.00+
- Kotlin 2.0.21+
- Gradle 8.10.0+
If you want to contribute to the project:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push the branch (
git push origin feature/amazing-feature) - Open a Pull Request
If you have questions or suggestions, please create an Issue in the repository.






