extract_icons_from_figma
Extract SVG icons from a Figma node URL, save new ones as TSX components, and skip duplicates in your icons folder. Handles deep nested nodes and instances via the Figma REST API.
Instructions
Extract all SVG icons from a Figma node URL and save new ones as TSX components. Uses the Figma REST API directly — handles deep/nested nodes including instances. Checks existing icons folder and skips duplicates. Parameter is figma_url (not figma_node_url).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dry_run | No | Preview results without writing files. Default: false. | |
| figma_url | Yes | Figma node URL. MUST use parameter name 'figma_url'. e.g. https://www.figma.com/design/xxx/Name?node-id=21551-57647 | |
| icons_dir | Yes | Absolute path to your icons folder e.g. /Users/you/project/src/components/icons | |
| copy_existing | No | Write similar/duplicate icons with a -copy suffix instead of skipping. Default: false. |