Elastic out-in ease
Elastic out-in is an elastic curve that swings around its target like a rubber band before it comes to rest. The out-in variant is fast at both ends and slows down in the middle, mostly useful as an effect. Amplitude 1, period 0.3. GSAP has no built-in ease with this exact shape, so the code uses CustomEase.
Measings shows it on real UI animations and lets you fine-tune the curve before you copy the code.
Code
GSAP CustomEase
gsap.registerPlugin(CustomEase);
CustomEase.create("elasticDefaultOutIn", "M0,0 C0.0052,0.0361 0.0104,0.104 0.0156,0.1806 C0.0208,0.2571 0.026,0.3417 0.0313,0.4161 C0.0365,0.4905 0.0417,0.5545 0.0469,0.5999 C0.0521,0.6453 0.0573,0.6723 0.0625,0.6821 C0.0729,0.7016 0.0833,0.6524 0.0938,0.5964 C0.099,0.5684 0.1042,0.5391 0.1094,0.5143 C0.1146,0.4896 0.1198,0.4693 0.125,0.4558 C0.1354,0.4288 0.1458,0.4302 0.1563,0.4446 C0.1667,0.4591 0.1771,0.4838 0.1875,0.5 C0.1979,0.5162 0.2083,0.5239 0.2188,0.5233 C0.2292,0.5226 0.2396,0.5148 0.25,0.5078 C0.2604,0.5008 0.2708,0.4949 0.2813,0.4928 C0.2917,0.4907 0.3021,0.4921 0.3125,0.4943 C0.3333,0.4988 0.3542,0.5036 0.375,0.5028 C0.3958,0.502 0.4167,0.4992 0.4375,0.499 C0.4479,0.4989 0.4583,0.4992 0.4688,0.4995 C0.474,0.4996 0.4792,0.4998 0.4844,0.4999 C0.487,0.5 0.4896,0.5001 0.4922,0.5001 C0.4935,0.5001 0.4948,0.5002 0.4961,0.5002 C0.4967,0.5002 0.4974,0.5002 0.498,0.5002 C0.4984,0.5002 0.4987,0.5002 0.499,0.5002 C0.4992,0.5002 0.4993,0.5002 0.4995,0.5002 C0.4996,0.5002 0.4997,0.5002 0.4998,0.5002 C0.4998,0.5002 0.4998,0.5002 0.4999,0.5002 C0.4999,0.5002 0.4999,0.5002 0.4999,0.5002 C0.5,0.5002 0.5,0.5081 0.5,0.5 C0.5,0.4919 0.5,0.4998 0.5001,0.4998 C0.5001,0.4998 0.5001,0.4998 0.5001,0.4998 C0.5002,0.4998 0.5002,0.4998 0.5002,0.4998 C0.5003,0.4998 0.5004,0.4998 0.5005,0.4998 C0.5007,0.4998 0.5008,0.4998 0.501,0.4998 C0.5013,0.4998 0.5016,0.4998 0.502,0.4998 C0.5026,0.4998 0.5033,0.4998 0.5039,0.4998 C0.5052,0.4998 0.5065,0.4999 0.5078,0.4999 C0.5104,0.4999 0.513,0.5 0.5156,0.5001 C0.5208,0.5002 0.526,0.5004 0.5313,0.5005 C0.5417,0.5008 0.5521,0.5011 0.5625,0.501 C0.5833,0.5008 0.6042,0.498 0.625,0.4972 C0.6458,0.4964 0.6667,0.5012 0.6875,0.5057 C0.6979,0.5079 0.7083,0.5093 0.7188,0.5072 C0.7292,0.5051 0.7396,0.4992 0.75,0.4922 C0.7604,0.4852 0.7708,0.4774 0.7813,0.4767 C0.7917,0.4761 0.8021,0.4838 0.8125,0.5 C0.8229,0.5162 0.8333,0.5409 0.8438,0.5554 C0.8542,0.5698 0.8646,0.5712 0.875,0.5442 C0.8802,0.5307 0.8854,0.5104 0.8906,0.4857 C0.8958,0.4609 0.901,0.4316 0.9063,0.4036 C0.9167,0.3476 0.9271,0.2984 0.9375,0.3179 C0.9427,0.3277 0.9479,0.3547 0.9531,0.4001 C0.9583,0.4455 0.9635,0.5095 0.9688,0.5839 C0.974,0.6583 0.9792,0.7429 0.9844,0.8194 C0.9896,0.896 0.9948,0.9639 1,1");
gsap.to(".box", { x: 200, duration: 0.6, ease: "elasticDefaultOutIn" });
CSS linear()
transition-timing-function: linear(0, 0.0211 0.27%, 0.0472 0.53%, 0.0774 0.8%, 0.1111 1.07%, 0.1861 1.6%, 0.3586 2.73%, 0.4361 3.27%, 0.5062 3.8%, 0.5594 4.27%, 0.586 4.53%, 0.6094 4.8%, 0.6298 5.07%, 0.647 5.33%, 0.661 5.6%, 0.6718 5.87%, 0.6796 6.13%, 0.6852 6.47%, 0.6865 6.8%, 0.6828 7.2%, 0.6742 7.6%, 0.6588 8.07%, 0.6229 8.87%, 0.5145 10.93%, 0.488 11.53%, 0.4685 12.07%, 0.4533 12.6%, 0.4437 13.07%, 0.4368 13.6%, 0.4341 14.13%, 0.4364 14.87%, 0.4452 15.67%, 0.4932 18.33%, 0.5091 19.4%, 0.5184 20.33%, 0.5229 21.33%, 0.521 22.8%, 0.4975 26.73%, 0.4918 29.07%, 0.5028 36.13%, 0.499 43.8%, 0.5009 56.67%, 0.4971 63.53%, 0.4992 65.8%, 0.5075 69.73%, 0.508 71.27%, 0.5034 73.07%, 0.4805 76.87%, 0.4767 78.4%, 0.4803 79.47%, 0.4893 80.47%, 0.5057 81.6%, 0.5557 84.4%, 0.5644 85.27%, 0.5653 86.07%, 0.5611 86.6%, 0.5539 87.07%, 0.5433 87.53%, 0.527 88.07%, 0.5065 88.6%, 0.4823 89.13%, 0.3804 91.07%, 0.3464 91.8%, 0.3318 92.2%, 0.3209 92.6%, 0.3147 93%, 0.3135 93.33%, 0.3165 93.67%, 0.3221 93.93%, 0.3332 94.27%, 0.3456 94.53%, 0.3612 94.8%, 0.38 95.07%, 0.4019 95.33%, 0.4337 95.67%, 0.4938 96.2%, 0.5639 96.73%, 0.6414 97.27%, 0.8139 98.4%, 0.8889 98.93%, 0.9226 99.2%, 0.9528 99.47%, 0.9789 99.73%, 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.0211_0.27%,0.0472_0.53%,0.0774_0.8%,0.1111_1.07%,0.1861_1.6%,0.3586_2.73%,0.4361_3.27%,0.5062_3.8%,0.5594_4.27%,0.586_4.53%,0.6094_4.8%,0.6298_5.07%,0.647_5.33%,0.661_5.6%,0.6718_5.87%,0.6796_6.13%,0.6852_6.47%,0.6865_6.8%,0.6828_7.2%,0.6742_7.6%,0.6588_8.07%,0.6229_8.87%,0.5145_10.93%,0.488_11.53%,0.4685_12.07%,0.4533_12.6%,0.4437_13.07%,0.4368_13.6%,0.4341_14.13%,0.4364_14.87%,0.4452_15.67%,0.4932_18.33%,0.5091_19.4%,0.5184_20.33%,0.5229_21.33%,0.521_22.8%,0.4975_26.73%,0.4918_29.07%,0.5028_36.13%,0.499_43.8%,0.5009_56.67%,0.4971_63.53%,0.4992_65.8%,0.5075_69.73%,0.508_71.27%,0.5034_73.07%,0.4805_76.87%,0.4767_78.4%,0.4803_79.47%,0.4893_80.47%,0.5057_81.6%,0.5557_84.4%,0.5644_85.27%,0.5653_86.07%,0.5611_86.6%,0.5539_87.07%,0.5433_87.53%,0.527_88.07%,0.5065_88.6%,0.4823_89.13%,0.3804_91.07%,0.3464_91.8%,0.3318_92.2%,0.3209_92.6%,0.3147_93%,0.3135_93.33%,0.3165_93.67%,0.3221_93.93%,0.3332_94.27%,0.3456_94.53%,0.3612_94.8%,0.38_95.07%,0.4019_95.33%,0.4337_95.67%,0.4938_96.2%,0.5639_96.73%,0.6414_97.27%,0.8139_98.4%,0.8889_98.93%,0.9226_99.2%,0.9528_99.47%,0.9789_99.73%,1)]
Webflow
In Interactions, choose a custom ease and paste this path:
M0,0 C0.0052,0.0361 0.0104,0.104 0.0156,0.1806 C0.0208,0.2571 0.026,0.3417 0.0313,0.4161 C0.0365,0.4905 0.0417,0.5545 0.0469,0.5999 C0.0521,0.6453 0.0573,0.6723 0.0625,0.6821 C0.0729,0.7016 0.0833,0.6524 0.0938,0.5964 C0.099,0.5684 0.1042,0.5391 0.1094,0.5143 C0.1146,0.4896 0.1198,0.4693 0.125,0.4558 C0.1354,0.4288 0.1458,0.4302 0.1563,0.4446 C0.1667,0.4591 0.1771,0.4838 0.1875,0.5 C0.1979,0.5162 0.2083,0.5239 0.2188,0.5233 C0.2292,0.5226 0.2396,0.5148 0.25,0.5078 C0.2604,0.5008 0.2708,0.4949 0.2813,0.4928 C0.2917,0.4907 0.3021,0.4921 0.3125,0.4943 C0.3333,0.4988 0.3542,0.5036 0.375,0.5028 C0.3958,0.502 0.4167,0.4992 0.4375,0.499 C0.4479,0.4989 0.4583,0.4992 0.4688,0.4995 C0.474,0.4996 0.4792,0.4998 0.4844,0.4999 C0.487,0.5 0.4896,0.5001 0.4922,0.5001 C0.4935,0.5001 0.4948,0.5002 0.4961,0.5002 C0.4967,0.5002 0.4974,0.5002 0.498,0.5002 C0.4984,0.5002 0.4987,0.5002 0.499,0.5002 C0.4992,0.5002 0.4993,0.5002 0.4995,0.5002 C0.4996,0.5002 0.4997,0.5002 0.4998,0.5002 C0.4998,0.5002 0.4998,0.5002 0.4999,0.5002 C0.4999,0.5002 0.4999,0.5002 0.4999,0.5002 C0.5,0.5002 0.5,0.5081 0.5,0.5 C0.5,0.4919 0.5,0.4998 0.5001,0.4998 C0.5001,0.4998 0.5001,0.4998 0.5001,0.4998 C0.5002,0.4998 0.5002,0.4998 0.5002,0.4998 C0.5003,0.4998 0.5004,0.4998 0.5005,0.4998 C0.5007,0.4998 0.5008,0.4998 0.501,0.4998 C0.5013,0.4998 0.5016,0.4998 0.502,0.4998 C0.5026,0.4998 0.5033,0.4998 0.5039,0.4998 C0.5052,0.4998 0.5065,0.4999 0.5078,0.4999 C0.5104,0.4999 0.513,0.5 0.5156,0.5001 C0.5208,0.5002 0.526,0.5004 0.5313,0.5005 C0.5417,0.5008 0.5521,0.5011 0.5625,0.501 C0.5833,0.5008 0.6042,0.498 0.625,0.4972 C0.6458,0.4964 0.6667,0.5012 0.6875,0.5057 C0.6979,0.5079 0.7083,0.5093 0.7188,0.5072 C0.7292,0.5051 0.7396,0.4992 0.75,0.4922 C0.7604,0.4852 0.7708,0.4774 0.7813,0.4767 C0.7917,0.4761 0.8021,0.4838 0.8125,0.5 C0.8229,0.5162 0.8333,0.5409 0.8438,0.5554 C0.8542,0.5698 0.8646,0.5712 0.875,0.5442 C0.8802,0.5307 0.8854,0.5104 0.8906,0.4857 C0.8958,0.4609 0.901,0.4316 0.9063,0.4036 C0.9167,0.3476 0.9271,0.2984 0.9375,0.3179 C0.9427,0.3277 0.9479,0.3547 0.9531,0.4001 C0.9583,0.4455 0.9635,0.5095 0.9688,0.5839 C0.974,0.6583 0.9792,0.7429 0.9844,0.8194 C0.9896,0.896 0.9948,0.9639 1,1
Related easings
- elastic.in(1, 0.3)
- elastic.out(1, 0.3)
- elastic.inOut(1, 0.3)
- elastic.in(1, 1.2)
- elastic.out(1, 1.2)
- elastic.inOut(1, 1.2)
- Elastic light out-in
- Cubic out-in
- Sine out-in
- Expo out-in
- Circ out-in
- Back out-in
See how Elastic out-in measures up against all 91 easings in the easing comparison: progress over time, overshoot and peak speed.
