INTERACTION DEMO
GSAP Reveal Demo
This module animates into view as you scroll, using GSAP and ScrollTrigger for a smooth, controlled reveal.
The animation is intentionally subtle so the content remains clear and accessible.
GSAP Reveal Blurb
This Blurb is the animation target. Scroll to reveal it with GSAP and ScrollTrigger.
IMPLEMENTATION
<script src="https://cdn.jsdelivr.net/npm/gsap@3.12.5/dist/gsap.min.js"></script>\n<script src="https://cdn.jsdelivr.net/npm/gsap@3.12.5/dist/ScrollTrigger.min.js"></script>\n<script>\n(function () {\n function initGsapReveal() {\n var targets = document.querySelectorAll('.gsap-reveal-target');\n if (!targets.length) return;\n\n if (window.matchMedia('(prefers-reduced-motion: reduce)').matches) {\n targets.forEach(function (target) {\n target.style.opacity = '1';\n target.style.transform = 'none';\n });\n return;\n }\n\n if (!window.gsap || !window.ScrollTrigger) {\n targets.forEach(function (target) {\n target.style.opacity = '1';\n target.style.transform = 'none';\n });\n return;\n }\n\n gsap.registerPlugin(ScrollTrigger);\n\n targets.forEach(function (target) {\n gsap.fromTo(\n target,\n { opacity: 0, y: 28 },\n {\n opacity: 1,\n y: 0,\n duration: 0.8,\n ease: 'power2.out',\n overwrite: 'auto',\n scrollTrigger: {\n trigger: target,\n start: 'top 85%',\n once: true\n }\n }\n );\n });\n }\n\n if (document.readyState === 'loading') {\n document.addEventListener('DOMContentLoaded', initGsapReveal);\n } else {\n initGsapReveal();\n }\n})();\n</script>