# LinearGradientPaintOptions
Options for creating a linear gradient paint. If start/end are not provided, they default to the left and right edges of the shape bounds, vertically centered.

{/* Do not edit this file. It is automatically generated by API Documenter. */}

## LinearGradientPaintOptions interface

Options for creating a linear gradient paint. If start/end are not provided, they default to the left and right edges of the shape bounds, vertically centered.

**Signature:**

```typescript
interface LinearGradientPaintOptions
```

## Example

```ts
// Create a linear gradient with defined start and end positions
group.createFill({
  type: "GRADIENT_LINEAR",
  start: { x: 0, y: 100 },
  end: { x: 200, y: 100 },
  stops: [
    { color: { r: 255, g: 0, b: 0 }, offset: 0, opacity: 1 },
    { color: { r: 0, g: 0, b: 255 }, offset: 1, opacity: 1 },
  ],
});

// Create a linear gradient spanning the shape width
group.createFill({
  type: "GRADIENT_LINEAR",
  stops: [
    { color: { r: 255, g: 0, b: 0 }, offset: 0, opacity: 1 },
    { color: { r: 0, g: 0, b: 255 }, offset: 1, opacity: 1 },
  ],
});
```

## Properties

<table>
  <thead>
    <tr>
      <th>
        Property
      </th>

      <th>
        Modifiers
      </th>

      <th>
        Type
      </th>

      <th>
        Description
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        [end?](/en/creator-api/types/linear-gradient-paint-options/end)
      </td>

      <td />

      <td>
        [Vector](/en/creator-api/values/vector)
      </td>

      <td>
        _(Optional)_ The end point of the gradient. If not provided, defaults to the right edge of the shape bounds, vertically centered.
      </td>
    </tr>

    <tr>
      <td>
        [start?](/en/creator-api/types/linear-gradient-paint-options/start)
      </td>

      <td />

      <td>
        [Vector](/en/creator-api/values/vector)
      </td>

      <td>
        _(Optional)_ The start point of the gradient. If not provided, defaults to the left edge of the shape bounds, vertically centered.
      </td>
    </tr>

    <tr>
      <td>
        [stops](/en/creator-api/types/linear-gradient-paint-options/stops)
      </td>

      <td />

      <td>
        [ColorStops](/en/creator-api/values/color-stops)
      </td>

      <td>
        Array of color stops defining the gradient
      </td>
    </tr>

    <tr>
      <td>
        [type](/en/creator-api/types/linear-gradient-paint-options/type)
      </td>

      <td />

      <td>
        "GRADIENT\_LINEAR"
      </td>

      <td />
    </tr>
  </tbody>
</table>
