UNPKG

rn-liquid-glass-view

Version:
71 lines (44 loc) β€’ 1.72 kB
# 🧊 React Native Liquid Glass Bring your UI into the future with **React Native Liquid Glass** β€” a sleek, glassmorphic view powered by Apple’s new `UIGlassEffect` in **iOS 18**. Perfectly frosted. Surprisingly easy. > ⚠️ **iOS 26+ only** > On Android and on iOS versions below 26, this component returns a `<Pressable />` as a fallback. --- ## ✨ Features - **System-native glassmorphism** β€” powered by `UIGlassEffect` for real iOS-level transparency and blur. - **Plug-and-play simplicity** β€” drop it in your component tree, no native configuration required. - **Built with TypeScript** β€” get full IntelliSense and prop validation out of the box. - **Safe by design** β€” auto-fallback ensures compatibility across platforms without conditional logic. - **Lightweight and fast** β€” minimal footprint with zero extra dependencies. --- ## 🎬 Demo <p align="center"> <img src=".github/images/demo.gif" height="500" /> </p> --- ## πŸ“¦ Installation ```sh npm install rn-liquid-glass-view # or yarn add rn-liquid-glass-view ``` --- ## πŸ›  Requirements - iOS 26 or higher - Xcode 26 --- ## ⚑ Performance Tip For optimal performance on iOS, keep either the width or height of your `LiquidGlassView` under **65px**. The native `UIGlassEffect` requires significant processing power, and smaller dimensions help maintain smooth performance. ## πŸš€ Usage ```tsx import { LiquidGlassView } from 'rn-liquid-glass-view'; <LiquidGlassView style={{ width: 200, height: 61 }} onPress={() => console.log('Tapped the glass!')} />; ``` --- ## 🀝 Contributing We welcome contributions! Check out our [contributing guide](CONTRIBUTING.md) to get started. --- ## πŸ“„ License MIT