GSAP MatchMedia
gsap_matchmediaGenerate GSAP matchMedia code to run different animations per breakpoint. Uses CSS media queries to define breakpoints, automatically reverting animations when breakpoints stop matching.
Instructions
Generate gsap.matchMedia() code that runs different animations per breakpoint or media query. Use when animations need to change based on screen size or prefers-reduced-motion. Each breakpoint specifies a CSS media query string (e.g. '(max-width: 768px)') and its own animations — GSAP auto-reverts them when the breakpoint stops matching. For a single animation without breakpoints use gsap_tween instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| breakpoints | Yes | Array of breakpoints with media queries and animations | |
| includeImports | No |