figma_variable_modes
Sets the variable mode (light or dark) on a node to prevent design system variables from rendering as black. Applies to all variable collections by default, or to a specific collection with collectionName.
Instructions
Sets the variable mode (e.g. light/dark) on a node — required on every new artboard, or DS variables render as black. By default sets the mode on ALL variable collections at once (pass modeIndex only). Pass collectionName to target a single collection instead. Params: nodeId (required, typically the artboard), modeIndex (required, 0=default/light, 1=dark), collectionName (optional). Requires Phase 2.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nodeId | Yes | Node ID (typically the artboard). | |
| modeIndex | Yes | Mode index. 0 = default/light, 1 = dark (if available). | |
| collectionName | No | Optional — variable collection name. Omit to set the mode on ALL collections at once (recommended). |