react-native-mesh-gradient
Version:
Mesh Gradient for React Native
52 lines (39 loc) • 905 B
Markdown
Mesh Gradient for React Native
Mesh Gradient works only on iOS 18 or higher.
Mesh Gradient requires Xcode 16 or higher.
To change the default Xcode build version, run the following command:
```sh
sudo xcode-select -s /path/to/Xcode.app
```
To check the current Xcode build version, run the following command:
```sh
xcodebuild -version
```
https://github.com/user-attachments/assets/cff00e3d-200f-47b6-b530-e4a856589e31
```sh
yarn add react-native-mesh-gradient
```
```js
import { MeshGradient } from 'react-native-mesh-gradient'
<MeshGradient
style={{ flex: 1 }}
points={[
[], [1.0, 0.0],
[], [1.0, 1.0]
]}
colors={[
'#ff0000', '#dd8015',
'#15cce4', '#e6d10f'
]}
animatedColors={[
'#15cce4', '#0000ff',
'#ff0000', '#dd8015'
]}
animationDuration={5}
/>
```