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.18 kB
JavaScript
/**
* ScrollingText v0.5.7
* build on Sat, 12 Jul 2025 18:15:30 GMT
* (c) 2025 Hardik Naik
* Released under the ISC License.
*/
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):((t="undefined"!=typeof globalThis?globalThis:t||self).ScrollingTextAnimation=t.ScrollingTextAnimation||{},t.ScrollingTextAnimation.hinge=n())}(this,(function(){"use strict";function t(t,n){void 0===n&&(n={});var e=n.insertAt;if(t&&"undefined"!=typeof document){var o=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===e&&o.firstChild?o.insertBefore(i,o.firstChild):o.appendChild(i),i.styleSheet?i.styleSheet.cssText=t:i.appendChild(document.createTextNode(t))}}t("@keyframes scrolling-text-hinge-out{0%{animation-timing-function:ease-in-out}20%,60%{animation-timing-function:ease-in-out;transform:rotate(80deg)}40%,80%{animation-timing-function:ease-in-out;opacity:1;transform:rotate(60deg)}to{opacity:0;transform:translate3d(0,700px,0)}}");return t(".scrolling-text-exit{transform-origin:top left}"),{exitAnimation:"scrolling-text-hinge-out"}}));