UNPKG

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.17 kB
/** * ScrollingText-flip v6.1.5 * build on Wed, 31 Dec 2025 04:31:19 GMT * (c) 2025 Hardik Naik * Released under the MIT License. */ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):((t="undefined"!=typeof globalThis?globalThis:t||self).ScrollingTextAnimation=t.ScrollingTextAnimation||{},t.ScrollingTextAnimation.flip=e())}(this,(function(){"use strict";var t="scrolling-text-flip-in",e="scrolling-text-flip-out";return function(t,e){void 0===e&&(e={});var o=e.insertAt;if("undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===o&&n.firstChild?n.insertBefore(i,n.firstChild):n.appendChild(i),i.styleSheet?i.styleSheet.cssText=t:i.appendChild(document.createTextNode(t))}}("@keyframes scrolling-text-flip-in{0%{opacity:0;transform:rotateX(-90deg) translateY(-30px)}to{opacity:1;transform:rotateX(0deg) translateY(0)}}@keyframes scrolling-text-flip-out{0%{transform:rotateX(0deg) translateY(0)}to{opacity:0;transform:rotateX(90deg) translateY(30px)}}"),{enterAnimation:t,exitAnimation:e}}));