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

Sets how long a layer appears in your composition.

## Example

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

## Parameters

**layerName** `string | string[]` *required*

Name of the layer to modify. Layers with this name in every composition of the project are changed. Pass an array of names to change several layers.

**value** `number` *required*

Duration value in seconds for how long the layer should be visible.

## Notes

* The function sets the layer's out point to its in point plus `value`.
* For a precomp layer, the function also sets the duration of the nested composition to `value`.
* The layer's start time remains unchanged.
* Duration is measured in seconds.


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