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

> Sets the visibility state of a layer by name

Controls layer visibility to show or hide elements in your composition. Perfect for creating dynamic content where elements appear or disappear based on your data.

## Example

```json theme={null}
{
  "type": "function",
  "name": "nx:layer-state-set",
  "params": {
    "layerName": "Background",
    "visible": true
  }
}
```

## Parameters

<ParamField path="layerName" type="string" required>
  Name of the layer to modify
</ParamField>

<ParamField path="visible" type="boolean" required>
  Whether the layer should be visible (enabled)
</ParamField>
