Declaration
import { MeshGradient } from 'swiftui-react-native';nonisolated struct MeshGradientInitializers
5 SwiftUI initializers back <MeshGradient>. The props you pass pick one.
<MeshGradient
width: number
height: number
bezierPoints: SwiftUI.MeshGradientBezierPoint[]
colors: SwiftUI.Color[]
background?: SwiftUI.Color
smoothsColors?: boolean
colorSpace?: SwiftUI.GradientColorSpace
/>@export(implementation) nonisolated init(
width: Int,
height: Int,
bezierPoints: [MeshGradient.BezierPoint],
colors: [Color],
background: Color = .clear,
smoothsColors: Bool = true,
colorSpace: Gradient.ColorSpace = .device
)width*numberthe width of the mesh, i.e. the number of vertices per row.
height*numberthe height of the mesh, i.e. the number of vertices per column.
bezierPoints*SwiftUI.MeshGradientBezierPoint[]the array of points and control points, containing
width x heightelements.colors*SwiftUI.Color[]the array of colors, containing
width x heightelements.backgroundSwiftUI.Colorthe background color, this fills any points outside the defined vertex mesh.
Default
`.clear`smoothsColorsbooleanwhether cubic (smooth) interpolation should be used for the colors in the mesh (rather than only for the shape of the mesh).
Default
`true`colorSpaceSwiftUI.GradientColorSpacethe color space in which to interpolate vertex colors.
Default
`.device`
Also takes the common view props: modifiers, style and testID.
See also
More in Colors and gradients.