GSAP Flip
gsap_flipAnimates layout transitions by capturing current DOM state, applying changes (reorder, reparent, toggle class), and animating to the new state using GSAP Flip.
Instructions
Animate smooth layout transitions using GSAP Flip (capture-change-animate). Use for reordering, reparenting, or class-toggle DOM changes. For regular positional animations use gsap_tween instead.
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": {
"targets": "<targets>"
},
"name": "gsap_flip"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | No | Flip workflow action — "full" generates complete capture-change-animate flow, "state"/"getState" captures current state, "from" animates from captured state, "fit" scales/positions element to match another | full |
| options | No | ||
| targets | Yes | CSS selector | |
| stateChange | No | Description of DOM change (comment for full; destination selector for fit) | |
| includeImports | No |