SVG to React component
svg_to_reactConvert SVG code into a React component with svgo optimization, JSX attribute names, and root prop spreading for external size, color, and aria-label control.
Instructions
Converts an SVG (e.g. from get_icon) into a React component: optimized with svgo, JSX attribute names, and props spread on the root so size, color and aria-label can be set from outside.
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": {
"svg": "<svg>"
},
"name": "svg_to_react"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| svg | Yes | Full SVG code | |
| name | No | PascalCase component name | Icon |
| optimize | No | ||
| typescript | No |