๐ฎ Liquid glass blur effect for React Native โ AGSL GPU shader on Android, Metal GPU shader on iOS.
Real-time refraction, chromatic aberration, backdrop blur, iridescence, edge glow and more โ at 60โ120 FPS.
demo.mp4
A beautiful "liquid glass" blur effect for React Native cards and UI elements โ on both Android and iOS.
The "liquid glass" aesthetic became popular in modern mobile UI design. It gives UI elements a translucent, frosted-glass look with light refraction, blurred backdrop, edge glow, and glare โ similar to looking through a piece of slightly curved glass.
The problem this solves: React Native has no built-in way to achieve this effect with rich glass controls across platforms. This library provides a unified API with high-fidelity Android shaders and a native iOS Metal renderer.
| Platform | Implementation | Min version | Notes |
|---|---|---|---|
| Android | AGSL GPU shader (RuntimeShader) |
API 33 (Android 13) | Full shader: refraction, chromatic aberration, iridescence |
| iOS | Metal shader + shared backdrop texture | iOS 15+ | Same props API, iOS-native GPU pipeline |
npm install @uginy/react-native-liquid-glass
# or
yarn add @uginy/react-native-liquid-glassIf you use Expo (most common):
npx expo prebuild --clean
npx expo run:android # for Android
npx expo run:ios # for iOS
โ ๏ธ This library uses native code. Expo Go does not work โ you need a dev build or bare React Native.
import React from 'react';
import { ImageBackground, Text, StyleSheet } from 'react-native';
import { LiquidGlassView } from '@uginy/react-native-liquid-glass';
const bg = require('./assets/background.png');
export default function App() {
return (
<ImageBackground source={bg} style={styles.bg}>
<LiquidGlassView style={styles.card}>
<Text style={styles.text}>Hello, Glass! ๐ฎ</Text>
</LiquidGlassView>
</ImageBackground>
);
}
const styles = StyleSheet.create({
bg: { flex: 1, justifyContent: 'center', padding: 20 },
card: { borderRadius: 24, padding: 20 },
text: { color: '#fff', fontSize: 20, fontWeight: '700' },
});<LiquidGlassView
blurRadius={60}
tintColor="#ffffff"
glassOpacity={0.12}
noiseIntensity={0.08}
cornerRadius={16}
style={{ padding: 20 }}
>
<Text style={{ color: '#fff' }}>Frosted ๐ง</Text>
</LiquidGlassView><LiquidGlassView
blurRadius={20}
refractionStrength={0.12}
chromaticAberration={0.3}
glareIntensity={0.8}
edgeGlowIntensity={0.5}
cornerRadius={32}
style={{ width: 200, height: 200 }}
>
<Text style={{ color: '#fff' }}>Crystal ๐</Text>
</LiquidGlassView><LiquidGlassView
iridescence={0.7}
edgeGlowIntensity={0.3}
blurRadius={40}
cornerRadius={24}
style={{ padding: 20 }}
>
<Text style={{ color: '#fff' }}>Iridescent ๐</Text>
</LiquidGlassView>import { LiquidGlassView, LIQUID_GLASS_CRYSTAL } from '@uginy/react-native-liquid-glass';
<LiquidGlassView {...LIQUID_GLASS_CRYSTAL} style={{ borderRadius: 24, padding: 20 }}>
<Text style={{ color: '#fff' }}>Crystal preset</Text>
</LiquidGlassView>Available presets: LIQUID_GLASS_DEFAULTS ยท LIQUID_GLASS_FROSTED ยท LIQUID_GLASS_CRYSTAL ยท LIQUID_GLASS_WARM ยท LIQUID_GLASS_IRIDESCENT
| Prop | Default | Description |
|---|---|---|
blurRadius |
20 |
Blur strength (0โ100) |
refractionStrength |
0.03 |
Edge distortion amount |
tintColor |
#ffffff |
Glass tint color |
glassOpacity |
0.05 |
Tint blend strength |
chromaticAberration |
0.05 |
RGB color split at edges |
edgeGlowIntensity |
0.18 |
Fresnel edge glow |
glareIntensity |
0.3 |
Specular highlight |
iridescence |
0.0 |
Rainbow shimmer |
cornerRadius |
24 |
Rounded corners |
noiseIntensity |
0.0 |
Film grain texture |
| Requirement | |
|---|---|
| Android | API 33+ (Android 13+), New Architecture |
| iOS | iOS 15+ |
| React Native | New Architecture (newArchEnabled=true) |
| Expo | SDK 54+ |
| Android | iOS | |
|---|---|---|
| Refraction / distortion | โ Full shader | โ Full shader |
| Chromatic aberration | โ Yes | โ Yes |
| Live backdrop blur | โ Yes | โ Yes |
| Expo Go | โ | โ |
| Web | โ | โ |
glass/
โโโ modules/liquid-glass/ # npm package โ @uginy/react-native-liquid-glass
โโโ app/ # Expo demo app (Android + iOS)
MIT ยฉ Ugin