# ShapeContainerMixin.createGroup
Creates a new group containing the specified shapes

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

## ShapeContainerMixin.createGroup() method

Creates a new group containing the specified shapes

**Signature:**

```typescript
createGroup(opts?: GroupOptions): Group;
```

## Parameters

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

      <th>
        Type
      </th>

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

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

      <td>
        [GroupOptions](../../types/group-options)
      </td>

      <td>
        _(Optional)_ Optional configuration for creating a group
      </td>
    </tr>
  </tbody>
</table>

**Returns:**

[Group](../group)

The newly created group

## Example

```ts
// Create a group containing two shapes
const group = await layer.createGroup({ shapes: [shape1, shape2] });

// Create an empty group
const emptyGroup = await layer.createGroup();
```
