Toggle Sidebar B
Light & dark mode D

LinearGradient

Create smooth linear color gradients

Create smooth linear color gradients

Props

PropTypeDefaultDescription
colorAcolor#1aff00The starting color of the gradient
colorBcolor#0000ffThe ending color of the gradient
startposition{"x":0,"y":0.5}The starting point of the gradient
endposition{"x":1,"y":0.5}The ending point of the gradient
anglerange0Additional rotation angle of the gradient (in degrees)
edges"stretch" | "transparent" | "mirror" | "wrap"stretchHow to handle areas beyond the gradient endpoints
colorSpace"linear" | "oklch" | "oklab" | "hsl" | "hsv" | "lch"linearColor space for color interpolation

Usage

vue
<Shader>
  <LinearGradient />
</Shader>