figma_export_ui_states
Exports a component's UI states as separate files with a manifest, and flags identical state files so accidental hover or active duplicates are caught.
Instructions
Export the states of a button/component as one file per state, plus a manifest naming them. A COMPONENT_SET names its variants by property (the only property, or the one you pass as property); a frame names them by layer name. States with identical bytes are reported — a hover that draws exactly like normal is usually a bug, though it can be deliberate. Every file is re-read from disk: its size is checked against the node and its hash recorded.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "figma_export_ui_states"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scale | No | PNG scale; files are named @2x, @3x … when it is not 1 | |
| format | No | SVG for icons (the file carries width/height), PNG otherwise | PNG |
| nodeId | No | A component set or a frame whose children are the states; defaults to the single selected node | |
| outDir | No | Where the files go; defaults to a temp directory | |
| fileKey | No | Which connected Figma file to use: its fileKey (figma_whoami) or, when omitted, the only connected file. Required once more than one file is connected; figma_ping lists them. | |
| property | No | Which variant property names the states, when the set declares several |