LinearGradient

Create smooth linear color gradients

Props

  • colorA

    The starting color of the gradient

    Type
    string
    Default
    #1aff00
  • colorB

    The ending color of the gradient

    Type
    string
    Default
    #0000ff
  • stops

    Multi-stop gradient colors (overrides Color A / Color B when set)

    Type
    object
    Default
    null
  • start

    The starting point of the gradient

    Type
    {x: number, y: number}
    Default
    {"x":0,"y":0.5}
  • end

    The ending point of the gradient

    Type
    {x: number, y: number}
    Default
    {"x":1,"y":0.5}
  • angle

    Additional rotation angle of the gradient (in degrees)

    Type
    number
    Default
    0
  • edges

    How to handle areas beyond the gradient endpoints

    Type
    "stretch" | "transparent" | "mirror" | "wrap"
    Default
    stretch
  • colorSpace

    Color space for color interpolation

    Type
    "linear" | "oklch" | "oklab" | "hsl" | "hsv" | "lch"
    Default
    linear

Usage

<Shader>
  <LinearGradient />
</Shader>