GSAP Animation Controls
gsap_controlsGenerates code to control existing GSAP tweens or timelines with actions such as play, pause, reverse, or seek.
Instructions
Generate playback control code for an existing tween or timeline variable (play, pause, reverse, seek, timeScale, kill, progress). Use when you need runtime control over an animation you have already created. Provide the JS variable name (e.g. tl, heroAnimation) in variableName — NOT a CSS selector. For generating the animation itself use gsap_tween or gsap_timeline instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| value | No | Value for seek (seconds or label), timeScale (multiplier), or progress (0–1) | |
| action | Yes | The control action to generate | |
| target | No | Target type: tween, timeline, or global | timeline |
| selector | No | Deprecated: use variableName instead. Accepted for backward compatibility. | |
| generateUI | No | Generate an HTML control panel | |
| variableName | No | JavaScript variable name of the tween or timeline to control, e.g. tl, heroAnimation. NOT a CSS selector. |