« more projects

Delightful, responsive interactions right in your browser.

springTo.js is a lightweight JavaScript module that gives the simplest possible access to spring-physics based animations in the browser. It is designed to require only a single line of code which can be run from anywhere in your page.
While not necessary, it won't hurt to have some basic understanding of JavaScript to use it.

Beginners, go here to learn how to include a JavaScript file into your HTML. And this is the easiest way to run the required line of code.

Move any object on the screen
with just one line of code

// The unique identifier for the element you want to move.
// Horizontal target position. (px)
// Vertical target position. (px)
// The combination of these values defines the characteristics of the movement. (optional)
// They are: spring stiffness, object mass, friction.
// Delay before movement begins. (ms) (optional)
// Horizontal speed at beginning of movement. (optional)
// Useful for movement that doesn't follow a straight line.
// Vertical speed at beginning of movement. (optional)
// Useful for movement that doesn't follow a straight line.

elementSpringTo('#circle', 300, 250, [120, 10, 3], 1000, 200, 100);


see it in action

Facebook Home Bobble Prototype

Get started

Please be aware that as of now,
springTo.js is an alpha-stage proof of concept
and not meant for anything but experimental applications.


Download