web-scrolling-text
Version:
A lightweight, customizable text animation library for creating smooth scrolling text effects with support for React, Next.js, Angular and vanilla JavaScript
8 lines (7 loc) • 1.5 kB
JavaScript
/**
* ScrollingText v0.5.7
* build on Sat, 12 Jul 2025 18:15:35 GMT
* (c) 2025 Hardik Naik
* Released under the ISC License.
*/
!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):((n="undefined"!=typeof globalThis?globalThis:n||self).ScrollingTextAnimation=n.ScrollingTextAnimation||{},n.ScrollingTextAnimation.zoomInDown=t())}(this,(function(){"use strict";var n="scrolling-text-zoomInDown-in",t="scrolling-text-zoomInDown-out";return function(n,t){void 0===t&&(t={});var e=t.insertAt;if("undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===e&&i.firstChild?i.insertBefore(o,i.firstChild):i.appendChild(o),o.styleSheet?o.styleSheet.cssText=n:o.appendChild(document.createTextNode(n))}}("@keyframes scrolling-text-zoomInDown-in{0%{animation-timing-function:cubic-bezier(.55,.055,.675,.19);opacity:0;transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0)}60%{animation-timing-function:cubic-bezier(.175,.885,.32,1);opacity:1;transform:scale3d(.475,.475,.475) translate3d(0,60px,0)}}@keyframes scrolling-text-zoomInDown-out{40%{animation-timing-function:cubic-bezier(.55,.055,.675,.19);opacity:1;transform:scale3d(.475,.475,.475) translate3d(0,-60px,0)}to{animation-timing-function:cubic-bezier(.175,.885,.32,1);opacity:0;transform:scale3d(.1,.1,.1) translate3d(0,2000px,0)}}"),{enterAnimation:n,exitAnimation:t}}));