> ## 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

<ParamField path="composition" type="string" required>
  Name/ID of the composition containing the layer
</ParamField>

<ParamField path="layerIndex" type="string" required>
  Index of the layer to remove
</ParamField>
