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

> Sets the duration of a layer

Controls how long a layer appears in your composition. This function automatically handles different types of layers to set their duration.

## Example

```json theme={null}
{
  "type": "function",
  "name": "nx:layer-duration-set",
  "params": {
    "layerName": "Video Layer",
    "value": 5.5
  }
}
```

## Parameters

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

<ParamField path="value" type="number" required>
  Duration value in seconds for how long the layer should be visible.
</ParamField>

## Notes

* Works with all layer types including nested compositions
* The layer's start time remains unchanged
* Duration is measured in seconds
