map_to_react
Converts a Figma frame into a React component tree, providing JSX, Tailwind/CSS styling, component library suggestions, asset hints, and TypeScript prop types.
Instructions
Map a Figma frame to a React component tree with JSX structure, Tailwind or CSS styling output, component library suggestions, asset hints, and TypeScript prop definitions.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"access_token": "<access_token>",
"file_key": "<file_key>",
"node_id": "<node_id>"
},
"name": "map_to_react"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| node_id | Yes | Node ID of the frame to map | |
| file_key | Yes | Figma file key | |
| max_depth | No | Maximum node tree depth | |
| access_token | Yes | Figma personal access token | |
| style_format | No | CSS output format | tailwind |
| include_assets | No | Include asset export hints | |
| component_library | No | Target component library for element mapping | plain |
| include_prop_types | No | Generate TypeScript prop interfaces from variants |