Examples

This page lists the official examples that demonstrate various features of tween.js. You can find the source code for all examples in the examples/ directory of the repository.

Example Description
Hello World A simple, infinitely chained tween.
Bars Animating a large number of elements.
Black and Red Animating colors of many table cells.
Graphs Visual representation of all easing functions.
Simplest A minimal, barebones example.
Video and Time Syncing a tween's time with a video element.
Array Interpolation Tweening through an array of values.
Dynamic To (Object) Tweening towards a moving target object.
Dynamic To (Array) Tweening through a dynamic array of values.
Repeat Demonstrating the .repeat() method.
Relative Values Animating with relative values (e.g., +100).
Yoyo Using .yoyo() for back-and-forth animations.
Stop All Chained Stopping a chain of tweens.
Custom Functions Using custom easing functions.
Relative Start Time Demonstrating tween delays.
Pause Tween Pausing and resuming a tween.
Complex Properties Animating nested object properties.
Animate an Array Animating an array of values directly.
Generate Pow Easing Using the generatePow easing function.
Start from Current Starting a tween from its current values.
End Tween Demonstrating the .end() method.