> ## Documentation Index
> Fetch the complete documentation index at: https://www.nexrender.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# nx:layer-remove

> Removes a layer from a composition by index

Permanently removes a layer from a composition. Use this when you need to completely eliminate elements from your template based on your data.

## Example

```json theme={null}
{
  "type": "function",
  "name": "nx:layer-remove",
  "params": {
    "composition": "Main Comp",
    "layerIndex": 3
  }
}
```

## Parameters

**composition** `string` *required*

Name of the composition containing the layer

**layerIndex** `number` *required*

Position of the layer to remove, counting from 1 at the top of the composition's layer stack. A numeric string such as `"3"` is also accepted.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.