Scale pop

A small, lively arrival for badges and buttons.

Rendered video, with motion blur.

New
0.00 / 0.40 s

Live preview, driven by the code below. No motion blur.

What it does

The item grows from slightly small to full size with one small bounce.

Curve

Spring, bounce 0.18

Values

S is the frame's short side, 1080 px at 1080p. Unmeasured inputs in the preview are illustrations, not rules.

FactValue
Purpose
Enter
Acts on
Card
Typical length
0.35 to 0.45 s (11 to 14 frames at 30 fps)
Caution
Never on numbers, charts, text blocks or the camera.
PropertyValue
Scale
0.85 to 1
Curve
Spring, bounce 0.15 to 0.2
Duration
0.35 to 0.45 s
Opacity
0 to 1 over the first 40%
Export samples
12; 1 when still

Starting values from research. Measure against a reference before relying on them.

Code

ts
export const seg = (t: number, a: number, b: number) => Math.max(0, Math.min(1, (t - a) / (b - a)));

export const lerp = (a: number, b: number, k: number) => a + (b - a) * k;

export const out = (k: number) => (k >= 1 ? 1 : 1 - Math.pow(2, -10 * k));

export const io = (k: number) => (k < 0.5 ? 16 * k ** 5 : 1 - Math.pow(-2 * k + 2, 5) / 2);

export const inn = (k: number) => k * k * k;

export const cubicOut = (k: number) => 1 - Math.pow(1 - k, 3);

export const h = (i: number, j: number) => { const x = Math.sin(i * 127.1 + j * 311.7) * 43758.5453; return x - Math.floor(x); };

export const phase = (t: number, start = 0, duration = 0.6) => seg(t, start, start + duration);

export const easeInOut = (p: number) => p < 0.5 ? 4 * p ** 3 : 1 - (-2 * p + 2) ** 3 / 2;

export function springK(p: number, bounce = 0.18) {
  if (p <= 0) return 0;
  if (p >= 1) return 1;
  const lb = Math.log(bounce);
  const zeta = -lb / Math.sqrt(Math.PI ** 2 + lb ** 2);
  const w = 4.6 / zeta;
  const wd = w * Math.sqrt(1 - zeta ** 2);
  return 1 - Math.exp(-zeta * w * p) * (Math.cos(wd * p) + (zeta * w / wd) * Math.sin(wd * p));
}

export function scalePop(t: number, start = 0, duration = 0.4, bounce = 0.18) {
  const p = phase(t, start, duration);
  return { scale: lerp(0.85, 1, springK(p, bounce)), opacity: seg(p, 0, 0.4) };
}

Best practices

Use it forAvoid
Badges, buttons and small icons
Numbers, charts, text blocks or the camera
A notification arriving
Large cards or whole screens

Reduced motion: a simple opacity fade over 0.2 s.