elastic.inOut(2, 0.5) ease
Also known as Elastic strong in-out.
Elastic strong 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 2, period 0.5. It is identical to GSAP's built-in "elastic.inOut(2, 0.5)" 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(2, 0.5)" });
GSAP CustomEase
gsap.registerPlugin(CustomEase);
CustomEase.create("elasticStrongInOut", "M0,0 C0,0.0163 0,0.0005 0.0001,0.0005 C0.0001,0.0005 0.0001,0.0005 0.0001,0.0005 C0.0002,0.0005 0.0002,0.0005 0.0002,0.0005 C0.0003,0.0005 0.0004,0.0005 0.0005,0.0005 C0.0007,0.0005 0.0008,0.0005 0.001,0.0005 C0.0013,0.0005 0.0016,0.0005 0.002,0.0005 C0.0026,0.0006 0.0033,0.0006 0.0039,0.0006 C0.0052,0.0006 0.0065,0.0007 0.0078,0.0007 C0.0104,0.0008 0.013,0.0009 0.0156,0.001 C0.0208,0.0011 0.026,0.0013 0.0313,0.0015 C0.0417,0.0018 0.0521,0.002 0.0625,0.002 C0.0833,0.002 0.1042,0.0005 0.125,-0.0028 C0.1458,-0.0061 0.1667,-0.0115 0.1875,-0.0114 C0.2083,-0.0112 0.2292,-0.0031 0.25,0.0156 C0.2708,0.0343 0.2917,0.0652 0.3125,0.0644 C0.3229,0.0639 0.3333,0.0544 0.3438,0.0297 C0.3542,0.005 0.3646,-0.0355 0.375,-0.0884 C0.3854,-0.1412 0.3958,-0.2068 0.4063,-0.2633 C0.4167,-0.3198 0.4271,-0.3666 0.4375,-0.3641 C0.4479,-0.3616 0.4583,-0.3075 0.4688,-0.1678 C0.474,-0.0979 0.4792,-0.007 0.4844,0.1051 C0.4896,0.2172 0.4948,0.3505 0.5,0.5 C0.5052,0.6495 0.5104,0.7828 0.5156,0.8949 C0.5208,1.007 0.526,1.0979 0.5313,1.1678 C0.5417,1.3075 0.5521,1.3616 0.5625,1.3641 C0.5729,1.3666 0.5833,1.3198 0.5938,1.2633 C0.6042,1.2068 0.6146,1.1412 0.625,1.0884 C0.6354,1.0355 0.6458,0.995 0.6563,0.9703 C0.6667,0.9456 0.6771,0.9361 0.6875,0.9356 C0.7083,0.9348 0.7292,0.9657 0.75,0.9844 C0.7708,1.0031 0.7917,1.0112 0.8125,1.0114 C0.8333,1.0115 0.8542,1.0061 0.875,1.0028 C0.8958,0.9995 0.9167,0.998 0.9375,0.998 C0.9479,0.998 0.9583,0.9982 0.9688,0.9985 C0.974,0.9987 0.9792,0.9989 0.9844,0.999 C0.987,0.9991 0.9896,0.9992 0.9922,0.9993 C0.9935,0.9993 0.9948,0.9994 0.9961,0.9994 C0.9967,0.9994 0.9974,0.9994 0.998,0.9995 C0.9984,0.9995 0.9987,0.9995 0.999,0.9995 C0.9992,0.9995 0.9993,0.9995 0.9995,0.9995 C0.9996,0.9995 0.9997,0.9995 0.9998,0.9995 C0.9998,0.9995 0.9998,0.9995 0.9999,0.9995 C0.9999,0.9995 0.9999,0.9995 0.9999,0.9995 C1,0.9995 1,0.9837 1,1");
gsap.to(".box", { x: 200, duration: 0.6, ease: "elasticStrongInOut" });
CSS linear()
transition-timing-function: linear(0, 0.0015 8.47%, -0.0107 17.4%, -0.01 20.27%, -0.0044 22.07%, 0.0058 23.8%, 0.0193 25.4%, 0.0504 28.53%, 0.0604 29.87%, 0.0644 31.27%, 0.0594 32.47%, 0.0496 33.33%, 0.0337 34.2%, 0.0131 35%, -0.0134 35.8%, -0.0487 36.67%, -0.0935 37.6%, -0.1439 38.53%, -0.262 40.6%, -0.2932 41.2%, -0.3179 41.73%, -0.3406 42.33%, -0.3566 42.93%, -0.3636 43.47%, -0.3626 44%, -0.3557 44.4%, -0.3432 44.8%, -0.3243 45.2%, -0.2988 45.6%, -0.2661 46%, -0.2258 46.4%, -0.1777 46.8%, -0.1315 47.13%, -0.0683 47.53%, -0.0093 47.87%, 0.0691 48.27%, 0.1558 48.67%, 0.2341 49%, 0.3352 49.4%, 0.4249 49.73%, 0.6295 50.47%, 0.6994 50.73%, 0.7659 51%, 0.8442 51.33%, 0.917 51.67%, 0.9841 52%, 1.0454 52.33%, 1.1113 52.73%, 1.1689 53.13%, 1.2184 53.53%, 1.2599 53.93%, 1.2939 54.33%, 1.3206 54.73%, 1.3405 55.13%, 1.3557 55.6%, 1.3636 56.13%, 1.3625 56.67%, 1.3537 57.2%, 1.3361 57.8%, 1.312 58.4%, 1.2832 59%, 1.1074 62.13%, 1.0639 63%, 1.0289 63.8%, 0.9951 64.73%, 0.9709 65.6%, 0.9524 66.53%, 0.9406 67.53%, 0.9356 68.73%, 0.9396 70.13%, 0.9496 71.47%, 0.9807 74.6%, 0.9942 76.2%, 1.0044 77.93%, 1.01 79.73%, 1.0107 82.6%, 0.9985 91.53%, 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.0015_8.47%,-0.0107_17.4%,-0.01_20.27%,-0.0044_22.07%,0.0058_23.8%,0.0193_25.4%,0.0504_28.53%,0.0604_29.87%,0.0644_31.27%,0.0594_32.47%,0.0496_33.33%,0.0337_34.2%,0.0131_35%,-0.0134_35.8%,-0.0487_36.67%,-0.0935_37.6%,-0.1439_38.53%,-0.262_40.6%,-0.2932_41.2%,-0.3179_41.73%,-0.3406_42.33%,-0.3566_42.93%,-0.3636_43.47%,-0.3626_44%,-0.3557_44.4%,-0.3432_44.8%,-0.3243_45.2%,-0.2988_45.6%,-0.2661_46%,-0.2258_46.4%,-0.1777_46.8%,-0.1315_47.13%,-0.0683_47.53%,-0.0093_47.87%,0.0691_48.27%,0.1558_48.67%,0.2341_49%,0.3352_49.4%,0.4249_49.73%,0.6295_50.47%,0.6994_50.73%,0.7659_51%,0.8442_51.33%,0.917_51.67%,0.9841_52%,1.0454_52.33%,1.1113_52.73%,1.1689_53.13%,1.2184_53.53%,1.2599_53.93%,1.2939_54.33%,1.3206_54.73%,1.3405_55.13%,1.3557_55.6%,1.3636_56.13%,1.3625_56.67%,1.3537_57.2%,1.3361_57.8%,1.312_58.4%,1.2832_59%,1.1074_62.13%,1.0639_63%,1.0289_63.8%,0.9951_64.73%,0.9709_65.6%,0.9524_66.53%,0.9406_67.53%,0.9356_68.73%,0.9396_70.13%,0.9496_71.47%,0.9807_74.6%,0.9942_76.2%,1.0044_77.93%,1.01_79.73%,1.0107_82.6%,0.9985_91.53%,1)]
Webflow
In Interactions, choose a custom ease and paste this path:
M0,0 C0,0.0163 0,0.0005 0.0001,0.0005 C0.0001,0.0005 0.0001,0.0005 0.0001,0.0005 C0.0002,0.0005 0.0002,0.0005 0.0002,0.0005 C0.0003,0.0005 0.0004,0.0005 0.0005,0.0005 C0.0007,0.0005 0.0008,0.0005 0.001,0.0005 C0.0013,0.0005 0.0016,0.0005 0.002,0.0005 C0.0026,0.0006 0.0033,0.0006 0.0039,0.0006 C0.0052,0.0006 0.0065,0.0007 0.0078,0.0007 C0.0104,0.0008 0.013,0.0009 0.0156,0.001 C0.0208,0.0011 0.026,0.0013 0.0313,0.0015 C0.0417,0.0018 0.0521,0.002 0.0625,0.002 C0.0833,0.002 0.1042,0.0005 0.125,-0.0028 C0.1458,-0.0061 0.1667,-0.0115 0.1875,-0.0114 C0.2083,-0.0112 0.2292,-0.0031 0.25,0.0156 C0.2708,0.0343 0.2917,0.0652 0.3125,0.0644 C0.3229,0.0639 0.3333,0.0544 0.3438,0.0297 C0.3542,0.005 0.3646,-0.0355 0.375,-0.0884 C0.3854,-0.1412 0.3958,-0.2068 0.4063,-0.2633 C0.4167,-0.3198 0.4271,-0.3666 0.4375,-0.3641 C0.4479,-0.3616 0.4583,-0.3075 0.4688,-0.1678 C0.474,-0.0979 0.4792,-0.007 0.4844,0.1051 C0.4896,0.2172 0.4948,0.3505 0.5,0.5 C0.5052,0.6495 0.5104,0.7828 0.5156,0.8949 C0.5208,1.007 0.526,1.0979 0.5313,1.1678 C0.5417,1.3075 0.5521,1.3616 0.5625,1.3641 C0.5729,1.3666 0.5833,1.3198 0.5938,1.2633 C0.6042,1.2068 0.6146,1.1412 0.625,1.0884 C0.6354,1.0355 0.6458,0.995 0.6563,0.9703 C0.6667,0.9456 0.6771,0.9361 0.6875,0.9356 C0.7083,0.9348 0.7292,0.9657 0.75,0.9844 C0.7708,1.0031 0.7917,1.0112 0.8125,1.0114 C0.8333,1.0115 0.8542,1.0061 0.875,1.0028 C0.8958,0.9995 0.9167,0.998 0.9375,0.998 C0.9479,0.998 0.9583,0.9982 0.9688,0.9985 C0.974,0.9987 0.9792,0.9989 0.9844,0.999 C0.987,0.9991 0.9896,0.9992 0.9922,0.9993 C0.9935,0.9993 0.9948,0.9994 0.9961,0.9994 C0.9967,0.9994 0.9974,0.9994 0.998,0.9995 C0.9984,0.9995 0.9987,0.9995 0.999,0.9995 C0.9992,0.9995 0.9993,0.9995 0.9995,0.9995 C0.9996,0.9995 0.9997,0.9995 0.9998,0.9995 C0.9998,0.9995 0.9998,0.9995 0.9999,0.9995 C0.9999,0.9995 0.9999,0.9995 0.9999,0.9995 C1,0.9995 1,0.9837 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.inOut(1, 1.2)
- power2.inOut
- sine.inOut
- Expo in-out
- circ.inOut
- back.inOut(1.7)
See how elastic.inOut(2, 0.5) measures up against all 91 easings in the easing comparison: progress over time, overshoot and peak speed.
