apply_to_variants
Apply tokens to all variants of a Figma component set using a template with {axis} placeholders. Targets specific layers by name and type for precise bulk assignment.
Instructions
Bulk-apply tokens to every variant of a Figma component_set in a single call, using a token-path TEMPLATE with {axis} placeholders. Solves the 'tab bar / button / chip / icon-set' shape: 24+ variants, each with a per-variant token derived from the component's variant axes (variant, active, state, density, …). Works for ANY naming convention — you supply the template that matches your design system's path shape. Targets descendants by layerName (and optional layerType), so the token lands on the actual shape layer / instance / wrapper, not the variant frame. Optional clearProperties removes other token property keys on the same nodes (useful for fixing earlier wrong writes). dryRun: true returns the full plan without writing.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | ||
| dryRun | No | ||
| nodeId | No | ||
| fileKey | No | ||
| property | Yes | ||
| template | Yes | ||
| layerName | Yes | ||
| layerType | No | ||
| clearProperties | No |