RadialGradientPaintOptions

Options for creating a radial gradient paint. If start/end are not provided, start defaults to the center of the shape bounds and end defaults to the right edge of the bounds, both vertically centered.

RadialGradientPaintOptions interface

Options for creating a radial gradient paint. If start/end are not provided, start defaults to the center of the shape bounds and end defaults to the right edge of the bounds, both vertically centered.

Signature:

interface RadialGradientPaintOptions

Example

// Create a radial gradient with defined start and end positions
group.createFill({
  type: "GRADIENT_RADIAL",
  start: { x: 100, y: 100 },
  end: { x: 200, y: 100 },
  highlightAngle: 45,
  highlightLength: 50,
  stops: [
    { color: { r: 255, g: 255, b: 255 }, offset: 0, opacity: 1 },
    { color: { r: 0, g: 0, b: 0 }, offset: 1, opacity: 1 },
  ],
});

// Create a radial gradient with defaults
group.createFill({
  type: "GRADIENT_RADIAL",
  stops: [
    { color: { r: 255, g: 255, b: 255 }, offset: 0, opacity: 1 },
    { color: { r: 0, g: 0, b: 0 }, offset: 1, opacity: 1 },
  ],
});

Properties

Property

Modifiers

Type

Description

end?

Vector

(Optional) The end point of the gradient. If not provided, defaults to the right edge of the shape bounds, vertically centered.

highlightAngle?

number

(Optional) The angle of the highlight/focal point. Defaults to 0.

highlightLength?

number

(Optional) The length of the highlight/focal point from the center (-100 to 100). Defaults to 0.

start?

Vector

(Optional) The start point of the gradient. If not provided, defaults to the center of the shape bounds, vertically centered.

stops

ColorStops

Array of color stops defining the gradient

type

"GRADIENT_RADIAL"

Last updated: August 5, 2026 at 11:47 AMEdit this page