# ShapeMixin.moveBefore
Moves this shape immediately before the given sibling in render order.

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

## ShapeMixin.moveBefore() method

Moves this shape immediately before the given sibling in render order.

**Signature:**

```typescript
moveBefore(sibling: Shape): void;
```

## Parameters

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

      <th>
        Type
      </th>

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

  <tbody>
    <tr>
      <td>
        sibling
      </td>

      <td>
        [Shape](/en/creator-api/nodes/shape)
      </td>

      <td>
        The shape to move this shape before.
      </td>
    </tr>
  </tbody>
</table>

**Returns:** void

## Remarks

If `sibling` has a different parent (e.g. it lives in a different [Group](/en/creator-api/nodes/group) or [ShapeLayer](/en/creator-api/nodes/shape-layer)), this shape is **reparented** to the sibling's parent as part of the move.

## Example

```ts
const [first, second] = group.shapes;
second.moveBefore(first);
```
