rn-liquid-glass-view
Version:
iOS-only React Native liquid glass effect
71 lines (44 loc) β’ 1.72 kB
Markdown
# π§ 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