File: mesh-gradient.md | Updated: 11/15/2025
Hide navigation
Search
Ctrl K
Home Guides EAS Reference Learn
Reference version
SDK 54 (latest)
Archive Expo Snack Discord and Forums Newsletter
Expo MeshGradientAsk AI
A module that exposes MeshGradient view from SwiftUI to React Native.
Ask AI
iOS
tvOS
Bundled version:
~0.4.7
Copy page
Terminal
Copy
- npx expo install expo-mesh-gradient
If you are installing this in an existing React Native app
, make sure to install expo
in your project.
import { MeshGradientView } from 'expo-mesh-gradient'; function App() { return ( <MeshGradientView style={{ flex: 1 }} columns={3} rows={3} colors={['red', 'purple', 'indigo', 'orange', 'white', 'blue', 'yellow', 'green', 'cyan']} points={[ [0.0, 0.0], [0.5, 0.0], [1.0, 0.0], [0.0, 0.5], [0.5, 0.5], [1.0, 0.5], [0.0, 1.0], [0.5, 1.0], [1.0, 1.0], ]} /> ); }
Show More
MeshGradientViewiOS
tvOS
Type: React.[Element](https://www.typescriptlang.org/docs/handbook/jsx.html#function-component) <[MeshGradientViewProps](https://docs.expo.dev/versions/latest/sdk/mesh-gradient#meshgradientviewprops) >
colorsiOS
tvOS
Optional • Type: [ColorValue[]](https://reactnative.dev/docs/colors) • Default: []
An array of colors. Must contain columns * rows elements.
columnsiOS
tvOS
Optional • Type: number • Default: 0
Width of the mesh, i.e. the number of vertices per row.
ignoresSafeAreaiOS
Optional • Type: boolean • Default: true
Whether to ignore safe areas when positioning the view.
maskiOS
Optional • Type: boolean • Default: false
Masks the gradient using the alpha channel of the given children views.
Note: When this option is enabled, all user interactions (gestures) on children views are ignored.
pointsiOS
tvOS
Optional • Type: number[][] • Default: []
An array of two-dimensional points on the mesh. Must contain columns * rows elements.
resolutionAndroid
Optional • Type: { x: number, y: number }
Specifies how many points to sample on the path between points.
rowsiOS
tvOS
Optional • Type: number • Default: 0
Height of the mesh, i.e. the number of vertices per column.
smoothsColorsiOS
tvOS
Optional • Type: boolean • Default: true
Whether cubic (smooth) interpolation should be used for the colors in the mesh rather than only for the shape of the mesh.
[ViewProps](https://reactnative.dev/docs/view#props)