figma_create_variable
Create a single Figma variable in a specified collection, supporting color, float, string, boolean, timing, and easing types for design token workflows.
Instructions
Create a single Figma variable. For multiple variables, use figma_batch_create_variables instead (10-50x faster). Use figma_get_variables first to get collection IDs. Supports COLOR, FLOAT, STRING, BOOLEAN, and motion TIMING/EASING. Requires Desktop Bridge plugin.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Name for the new variable (e.g., 'primary-blue') | |
| description | No | Optional description for the variable | |
| collectionId | Yes | The collection ID to create the variable in (e.g., 'VariableCollectionId:123:456'). Get this from figma_get_variables. | |
| resolvedType | Yes | The variable type: COLOR, FLOAT, STRING, BOOLEAN, or the motion types TIMING and EASING. TIMING values are seconds (a number like 0.3, or '300ms' / '0.3s'). EASING values are 'cubic-bezier(x1, y1, x2, y2)', a Figma easing name (EASE_IN, EASE_OUT, EASE_IN_AND_OUT, LINEAR, EASE_IN_BACK, EASE_OUT_BACK, EASE_IN_AND_OUT_BACK, GENTLE, QUICK, BOUNCY, SLOW, HOLD) or 'spring(bounce)' with bounce 0–1. | |
| valuesByMode | No | Optional initial values by mode ID. Example: { '1:0': '#FF0000', '1:1': '#0000FF' } |