# ShapeContainerMixin.createPath
Creates a new path shape in this container

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

## ShapeContainerMixin.createPath() method

Creates a new path shape in this container

**Signature:**

```typescript
createPath(opts?: PathOptions): Path;
```

## Parameters

<table>
  <thead>
    <tr>
      <th>
        Parameter
      </th>

      <th>
        Type
      </th>

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

  <tbody>
    <tr>
      <td>
        opts
      </td>

      <td>
        [PathOptions](../../types/path-options)
      </td>

      <td>
        _(Optional)_ Optional configuration for the path
      </td>
    </tr>
  </tbody>
</table>

**Returns:**

[Path](../path)

The newly created path

## Example

```ts
// Create a path shape
const path = await layer.createPath({
  points: [
    { vertex: { x: 0, y: 0 }, inTan: { x: 0, y: 0 }, outTan: { x: 0, y: 0 } },
    { vertex: { x: 100, y: 100 }, inTan: { x: 0, y: 0 }, outTan: { x: 0, y: 0 } },
  ],
  closed: true,
});
```
