Add Layer
photopea_add_layerAdd an empty layer to the active document to enable drawing and editing operations. Configure the layer name, opacity, and blend mode before applying fills, gradients, or effects.
Instructions
Add a new empty layer to the active document. The new layer becomes the active layer. Use this before operations that draw onto a layer, such as fill_selection or add_gradient.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Display name for the new layer in the layers panel | |
| opacity | No | Layer opacity percentage (0 = fully transparent, 100 = fully opaque, default 100) | |
| blendMode | No | Blend mode (e.g. normal, multiply, screen, overlay, darken, lighten). Defaults to normal. |