Squash and stretch

Stretching an object along its path when it moves fast and flattening it on impact, so it looks elastic and has weight.

What is Squash and stretch?

Squash and stretch is often called the most important of the 12 principles of animation. A bouncing ball stretches tall as it falls, flattens wide when it hits the floor, and stretches again as it takes off. Its volume stays about the same: when it gets shorter, it also gets wider.

In interfaces, use a light touch: a button that squashes slightly when pressed, an icon that stretches as it jumps, a toggle knob that widens as it slides, or a playful loading ball. A 5 to 15 percent change is plenty for UI; cartoon-sized squash suits mascots, games, and onboarding illustrations.

Set transform-origin to the side that touches the surface, the bottom for a bounce, so the object stays planted while it squashes. Change scaleX and scaleY in opposite directions, keep the effect off text, which just looks distorted, and drop it when prefers-reduced-motion is set.

All terms

Anticipation

A small move in the opposite direction just before the main action, like crouching before a jump, so the motion that follows reads clearly.

Follow-through

When the main object stops but loose, attached parts keep moving for a moment, swing past, and settle, which makes motion feel physical.

Scale

A CSS transform that draws an element larger or smaller around its transform origin, without pushing neighboring elements.

Transform origin

The point an element rotates and scales around. It defaults to the center, and moving it changes where a transform seems to start.