apply_shader
Import and apply a shader to a Figma node, targeting fills, strokes, or effects. Set property values by definition id or name, and choose to replace or append effects.
Instructions
Import (if needed) and apply a shader to a node. Effect shaders go on effects; fill shaders go on fills or strokes. properties may be keyed by property-definition id or by the author-defined name from propertyDefinitions. Prefer this over set_effects when applying a SHADER. Pass replace:false to append an effect shader alongside existing effects.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Shader name from list_shaders, if you do not have the id. | |
| nodeId | Yes | ||
| target | No | Where to apply. Defaults to effects for type=effect shaders and fills for type=fill shaders. | |
| replace | No | For effect shaders: true (default) replaces all effects; false appends. | |
| visible | No | For effect shaders. Default true. | |
| shaderId | No | Shader id from list_shaders. | |
| paintIndex | No | For fills/strokes, which paint slot to write. Default 0. | |
| properties | No | Property values keyed by definition id or property name. Hex strings are accepted for COLOR properties. |