# ShapeContainerMixin.createStar
Creates a new star shape in this container

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

## ShapeContainerMixin.createStar() method

Creates a new star shape in this container

**Signature:**

```typescript
createStar(opts?: StarOptions): Star;
```

## Parameters

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

      <th>
        Type
      </th>

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

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

      <td>
        [StarOptions](../../types/star-options)
      </td>

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

**Returns:**

[Star](../star)

The newly created star

## Example

```ts
// Create a star shape
const star = await layer.createStar({
  position: { x: 100, y: 100 },
  points: 5,
  outerRadius: 50,
  innerRadius: 25,
});
```
