render_variants
Render screenshots of multiple UI component variants with different props or states in one call, enabling verification of buttons, themes, and more.
Instructions
Render multiple variants of a component (different props/states) in one call. Returns a screenshot for each variant. Use this to verify buttons in all states, theme variations, etc.
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": {
"code": "<code>",
"variants": "<variants>"
},
"name": "render_variants"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | Component code (must export a function that accepts props) | |
| variants | Yes | Array of variants to render | |
| framework | No | Framework: html, react, vue, or svelte | react |
| width | No | Viewport width (px) | |
| height | No | Viewport height (px) |