# LayerMixin.moveBefore
Moves this layer immediately before the given sibling in render order.

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

## LayerMixin.moveBefore() method

Moves this layer immediately before (visually above) the given sibling in render order.

**Signature:**

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

## Parameters

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

      <th>
        Type
      </th>

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

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

      <td>
        [Layer](/en/creator-api/nodes/layer)
      </td>

      <td>
        The layer to move this layer before. Must be in the same scene.
      </td>
    </tr>
  </tbody>
</table>

**Returns:** void

## Remarks

Throws if `sibling` belongs to a different scene. Layers cannot be reparented across scenes via this method.

## Example

```ts
const [first, second] = creator.activeScene.layers;
second.moveBefore(first); // second now renders above first
```
