Beautiful iOS animated mesh gradient made with Expo
- ๐จ Beautiful animated mesh gradients
- ๐ Smooth color transitions and customizable points
- ๐ Native SwiftUI rendering on iOS
- โ๏ธ Fully configurable animations
- ๐ญ Optional masking, safe area ignoring, and more
npx expo install expo-ios-mesh-gradient
cd ios && pod install
npx expo prebuild --platform ios
pnpm ios
โ iOS only โ This module is built with SwiftUI and works exclusively on iOS.
import { AnimatedMeshGradient } from "expo-ios-mesh-gradient";
export default function App() {
return (
<AnimatedMeshGradient
columns={3}
rows={3}
colors={["#ff6ec4", "#7873f5", "#4ADEDE"]}
smoothsColors
animated
animationSpeed={0.003}
style={{ flex: 1 }}
>
{/* Optional content goes here */}
</AnimatedMeshGradient>
);
}
โ๏ธ Prop | ๐งพ Type | ๐งฎ Default | ๐ Description |
---|---|---|---|
columns |
number |
3 |
Number of columns for the mesh |
rows |
number |
3 |
Number of rows for the mesh |
points |
[number, number][] |
undefined |
Custom mesh point coordinates |
colors |
string[] |
[] |
Colors to render the gradient with |
smoothsColors |
boolean |
false |
Smooth out color transitions |
ignoresSafeArea |
boolean |
false |
Expand mesh into safe area |
mask |
boolean |
false |
Enable mask mode |
animated |
boolean |
false |
Enable animation |
animationSpeed |
number |
1 |
Controls speed of animation |
animationInterval |
number |
undefined |
Interval between animations |
noiseAmplitude |
number |
undefined |
Amplitude of mesh point noise |
frequencyModulation |
number |
undefined |
Modulation frequency for animation |
animationRanges |
[number, number][] |
undefined |
Ranges for point animation |
animationOffsets |
number[] |
undefined |
Per-point animation offset |
animationScales |
number[] |
undefined |
Per-point animation scaling factor |
style |
StyleProp<ViewStyle> |
undefined |
Custom styles for the wrapper |
children |
React.ReactNode |
undefined |
Optional child components |
- โ iOS (SwiftUI based)
- โ Android (not supported)
- โ๏ธ Expo
- ๐ SwiftUI
- ๐ฑ React Native
Feel free to open issues, feature requests, or PRs. All contributions are welcome!
MIT ยฉ rit3zh