This extension comes packed with snippets that cover the most popular GSAP methods and properties, helping you write GSAP code faster and more efficiently.
Included Snippets:
Animation Methods:
gsap.to(): Animate from the current state to the specified properties.
gsap.from(): Animate from specific values to the current state.
gsap.fromTo(): Animate between specific starting and ending values.
gsap.timeline(): Create sequences of animations that play in order.
ScrollTrigger Methods:
ScrollTrigger.create(): Set up scroll-based animations.
pin, scrub, markers: Common properties for scroll-based animations.
Draggable:
Quick setup for making elements draggable with GSAP.
Flip Plugin:
Transform states and flip them with animations.
Shortcut Examples:
The snippets are is inspired by GreenSock's documentation.
Basic understanding of GSAP is recommended to use the snippets effectively
⚙️ Extension Settings
This extension does not include any specific configuration settings. All snippets will be available automatically once installed. However, if you'd like to disable specific snippets, you can do so via VS Code's User Snippets settings.
🚧 Known Issues
Conflicting Shortcuts: Some common snippet prefixes (like to or fr) may conflict with other snippet extensions or built-in VS Code IntelliSense.
CSS Support: This extension currently focuses on JavaScript-based GSAP animations and doesn’t fully support CSS-only animations.
If you encounter any other issues, please feel free to report them in the issues section on GitHub.
🔧 Contributing
Contributions are welcome! If you have ideas for additional snippets, improvements, or bug fixes, feel free to submit a pull request or create an issue in the GitHub repository.
🎉 Conclusion
The GSAP GreenSock Snippets extension is the perfect tool for animators and developers looking to speed up their GSAP development workflow. With ready-made snippets for the most commonly used GSAP methods, you'll be animating faster and with fewer errors, whether you’re just getting started or you're a seasoned pro!