npm install --save shifty
- Speed: Shifty is optimized for performance and offers animation fidelity that is comparable to GSAP.
- Flexibility and extensibility: Shifty provides numerous low-level APIs to let you hook into its animation pipeline.
- Small footprint: The full build is less than 5Kb when minified and gzipped.
Shifty is a low-level animation solution. It does not perform any rendering, but it can be integrated into whatever rendering mechanism is most appropriate for your project. Shifty is meant to be a simpler alternative to richer tools like the excellent GreenSock Animation Platform. This can be critical for a project, especially ones that need to run well on mobile devices — just ask Yelp!
If your project requires extensive animation APIs and a robust plugin ecosystem, Greensock is an excellent choice. If you prefer less overhead and a more permissive license (MIT), Shifty might be the animation engine for you!
Please fork, use and contribute to Shifty! It is distributed under the MIT License, and experimentation is encouraged. If you find a bug or have a question about Shifty, please submit it via the Github issue tracker.
Getting started with Shifty
To create a basic tween, you could have something like this:
This snippet tweens and prints the
x variable from 0 to 10 over one second, and then prints the final value. You can animate as many properties in a single tween as you'd like.
See the Pen Shifty/GSAP/jQuery animation performance comparison by Jeremy Kahn (@jeremyckahn) on CodePen.