# StrokeOptions
Options for creating a stroke.

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

## StrokeOptions interface

Options for creating a stroke.

**Signature:**

```typescript
interface StrokeOptions
```

## Example

```ts
// Create a solid stroke
layer.createStroke({
  fill: { type: "SOLID", color: { r: 0, g: 0, b: 0 } },
  width: 2,
});

// Create a gradient stroke
layer.createStroke({
  fill: {
    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 },
    ],
  },
  width: 5,
});
```

## Properties

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

      <th>
        Modifiers
      </th>

      <th>
        Type
      </th>

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

  <tbody>
    <tr>
      <td>
        [fill](/en/creator-api/types/stroke-options/fill)
      </td>

      <td />

      <td>
        [PaintOptions](/en/creator-api/types/paint-options)
      </td>

      <td>
        The fill paint options for the stroke
      </td>
    </tr>

    <tr>
      <td>
        [width](/en/creator-api/types/stroke-options/width)
      </td>

      <td />

      <td>
        number
      </td>

      <td>
        The width of the stroke
      </td>
    </tr>
  </tbody>
</table>
