elastic.inOut(1, 1.2) ease
Also known as Elastic light in-out.
Elastic light in-out is an elastic curve that swings around its target like a rubber band before it comes to rest. The in-out variant is slow at both ends and fastest in the middle, good for moving something between two positions on screen. Amplitude 1, period 1.2. It is identical to GSAP's built-in "elastic.inOut(1, 1.2)" ease, so no plugin is needed there.
Measings shows it on real UI animations and lets you fine-tune the curve before you copy the code.
Code
GSAP
gsap.to(".box", { x: 200, duration: 0.6, ease: "elastic.inOut(1, 1.2)" });
GSAP CustomEase
gsap.registerPlugin(CustomEase);
CustomEase.create("elasticLightInOut", "M0,0 C0,0.0081 0,0.0002 0.0001,0.0002 C0.0001,0.0002 0.0001,0.0002 0.0001,0.0002 C0.0002,0.0002 0.0002,0.0002 0.0002,0.0002 C0.0003,0.0002 0.0004,0.0002 0.0005,0.0002 C0.0007,0.0002 0.0008,0.0002 0.001,0.0002 C0.0013,0.0002 0.0016,0.0002 0.002,0.0002 C0.0026,0.0002 0.0033,0.0002 0.0039,0.0002 C0.0052,0.0002 0.0065,0.0002 0.0078,0.0002 C0.0104,0.0002 0.013,0.0002 0.0156,0.0002 C0.0208,0.0002 0.026,0.0002 0.0313,0.0001 C0.0417,0.0001 0.0521,0 0.0625,-0.0002 C0.0833,-0.0004 0.1042,-0.001 0.125,-0.002 C0.1667,-0.0039 0.2083,-0.0091 0.25,-0.0135 C0.2708,-0.0157 0.2917,-0.0176 0.3125,-0.0142 C0.3333,-0.0108 0.3542,-0.0024 0.375,0.0229 C0.3958,0.0481 0.4167,0.0907 0.4375,0.1668 C0.4583,0.2429 0.4792,0.3556 0.5,0.5 C0.5208,0.6444 0.5417,0.7571 0.5625,0.8332 C0.5833,0.9093 0.6042,0.9519 0.625,0.9771 C0.6458,1.0024 0.6667,1.0108 0.6875,1.0142 C0.7083,1.0176 0.7292,1.0157 0.75,1.0135 C0.7917,1.0091 0.8333,1.0039 0.875,1.002 C0.8958,1.001 0.9167,1.0004 0.9375,1.0002 C0.9479,1 0.9583,0.9999 0.9688,0.9999 C0.974,0.9998 0.9792,0.9998 0.9844,0.9998 C0.987,0.9998 0.9896,0.9998 0.9922,0.9998 C0.9935,0.9998 0.9948,0.9998 0.9961,0.9998 C0.9967,0.9998 0.9974,0.9998 0.998,0.9998 C0.9984,0.9998 0.9987,0.9998 0.999,0.9998 C0.9992,0.9998 0.9993,0.9998 0.9995,0.9998 C0.9996,0.9998 0.9997,0.9998 0.9998,0.9998 C0.9998,0.9998 0.9998,0.9998 0.9999,0.9998 C0.9999,0.9998 0.9999,0.9998 0.9999,0.9998 C1,0.9998 1,0.9919 1,1");
gsap.to(".box", { x: 200, duration: 0.6, ease: "elasticLightInOut" });
CSS linear()
transition-timing-function: linear(0, -0.0024 13.33%, -0.0149 26.4%, -0.0159 29.53%, -0.0135 31.67%, -0.0081 33.47%, 0.0009 35.13%, 0.0137 36.67%, 0.04 38.73%, 0.0573 39.73%, 0.0767 40.67%, 0.0995 41.6%, 0.124 42.47%, 0.152 43.33%, 0.1812 44.13%, 0.2136 44.93%, 0.2496 45.73%, 0.2891 46.53%, 0.3321 47.33%, 0.42 48.8%, 0.5584 50.87%, 0.6294 52%, 0.704 53.33%, 0.7658 54.6%, 0.8003 55.4%, 0.8314 56.2%, 0.8592 57%, 0.8839 57.8%, 0.9074 58.67%, 0.9278 59.53%, 0.9611 61.33%, 0.9836 63.07%, 1 65%, 1.0101 67.07%, 1.0152 69.53%, 1.0151 73.27%, 1.0021 87.13%, 1);CSS has no built-in curve of this shape, so it is sampled into linear(), which works in all current browsers.
Tailwind
ease-[linear(0,-0.0024_13.33%,-0.0149_26.4%,-0.0159_29.53%,-0.0135_31.67%,-0.0081_33.47%,0.0009_35.13%,0.0137_36.67%,0.04_38.73%,0.0573_39.73%,0.0767_40.67%,0.0995_41.6%,0.124_42.47%,0.152_43.33%,0.1812_44.13%,0.2136_44.93%,0.2496_45.73%,0.2891_46.53%,0.3321_47.33%,0.42_48.8%,0.5584_50.87%,0.6294_52%,0.704_53.33%,0.7658_54.6%,0.8003_55.4%,0.8314_56.2%,0.8592_57%,0.8839_57.8%,0.9074_58.67%,0.9278_59.53%,0.9611_61.33%,0.9836_63.07%,1_65%,1.0101_67.07%,1.0152_69.53%,1.0151_73.27%,1.0021_87.13%,1)]
Webflow
In Interactions, choose a custom ease and paste this path:
M0,0 C0,0.0081 0,0.0002 0.0001,0.0002 C0.0001,0.0002 0.0001,0.0002 0.0001,0.0002 C0.0002,0.0002 0.0002,0.0002 0.0002,0.0002 C0.0003,0.0002 0.0004,0.0002 0.0005,0.0002 C0.0007,0.0002 0.0008,0.0002 0.001,0.0002 C0.0013,0.0002 0.0016,0.0002 0.002,0.0002 C0.0026,0.0002 0.0033,0.0002 0.0039,0.0002 C0.0052,0.0002 0.0065,0.0002 0.0078,0.0002 C0.0104,0.0002 0.013,0.0002 0.0156,0.0002 C0.0208,0.0002 0.026,0.0002 0.0313,0.0001 C0.0417,0.0001 0.0521,0 0.0625,-0.0002 C0.0833,-0.0004 0.1042,-0.001 0.125,-0.002 C0.1667,-0.0039 0.2083,-0.0091 0.25,-0.0135 C0.2708,-0.0157 0.2917,-0.0176 0.3125,-0.0142 C0.3333,-0.0108 0.3542,-0.0024 0.375,0.0229 C0.3958,0.0481 0.4167,0.0907 0.4375,0.1668 C0.4583,0.2429 0.4792,0.3556 0.5,0.5 C0.5208,0.6444 0.5417,0.7571 0.5625,0.8332 C0.5833,0.9093 0.6042,0.9519 0.625,0.9771 C0.6458,1.0024 0.6667,1.0108 0.6875,1.0142 C0.7083,1.0176 0.7292,1.0157 0.75,1.0135 C0.7917,1.0091 0.8333,1.0039 0.875,1.002 C0.8958,1.001 0.9167,1.0004 0.9375,1.0002 C0.9479,1 0.9583,0.9999 0.9688,0.9999 C0.974,0.9998 0.9792,0.9998 0.9844,0.9998 C0.987,0.9998 0.9896,0.9998 0.9922,0.9998 C0.9935,0.9998 0.9948,0.9998 0.9961,0.9998 C0.9967,0.9998 0.9974,0.9998 0.998,0.9998 C0.9984,0.9998 0.9987,0.9998 0.999,0.9998 C0.9992,0.9998 0.9993,0.9998 0.9995,0.9998 C0.9996,0.9998 0.9997,0.9998 0.9998,0.9998 C0.9998,0.9998 0.9998,0.9998 0.9999,0.9998 C0.9999,0.9998 0.9999,0.9998 0.9999,0.9998 C1,0.9998 1,0.9919 1,1
Related easings
- elastic.in(1, 0.3)
- elastic.out(1, 0.3)
- elastic.inOut(1, 0.3)
- Elastic out-in
- elastic.in(1, 1.2)
- elastic.out(1, 1.2)
- Elastic light out-in
- power2.inOut
- sine.inOut
- Expo in-out
- circ.inOut
- back.inOut(1.7)
See how elastic.inOut(1, 1.2) measures up against all 91 easings in the easing comparison: progress over time, overshoot and peak speed.
