Codrops 원본
Fullscreen Scrolling Slideshow
스크롤 · MIT
갤러리 안에서는 화면을 벗어나거나 움직임을 멈추면 예제도 닫힙니다. 다시 재생할 때는 처음부터 시작해요.
SOURCE FILES
원본 코드 읽기
수집한 원본 소스와 실행 안내를 함께 제공합니다.
src/css/base.css
*,
*::after,
*::before {
box-sizing: border-box;
}
:root {
font-size: 13px;
--color-text: #fff;
--color-bg: #000;
--color-link: rgba(255,255,255,0.5);
--color-link-hover: #f8c5dc;
--color-bg-slide: #171719;
}
body {
margin: 0;
color: var(--color-text);
background-color: var(--color-bg);
font-family: obviously, -apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, Arial, sans-serif;
text-transform: uppercase;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
width: 100%;
height: 100vh;
overflow: hidden;
}
/* Page Loader */
.js .loading::before,
.js .loading::after {
content: '';
position: fixed;
z-index: 1000;
}
.js .loading::before {
top: 0;
left: 0;
width: 100%;
height: 100%;
background: var(--color-bg);
}
.js .loading::after {
top: 50%;
left: 50%;
width: 60px;
height: 60px;
margin: -30px 0 0 -30px;
border-radius: 50%;
opacity: 0.4;
background: var(--color-link);
animation: loaderAnim 0.7s linear infinite alternate forwards;
}
@keyframes loaderAnim {
to {
opacity: 1;
transform: scale3d(0.5,0.5,1);
}
}
a {
text-decoration: none;
color: var(--color-link);
outline: none;
cursor: pointer;
}
a:hover {
color: var(--color-link-hover);
outline: none;
}
/* Better focus styles from https://developer.mozilla.org/en-US/docs/Web/CSS/:focus-visible */
a:focus {
/* Provide a fallback style for browsers
that don't support :focus-visible */
outline: none;
background: lightgrey;
}
a:focus:not(:focus-visible) {
/* Remove the focus indicator on mouse-focus for browsers
that do support :focus-visible */
background: transparent;
}
a:focus-visible {
/* Draw a very noticeable focus style for
keyboard-focus on browsers that do support
:focus-visible */
outline: 2px solid red;
background: transparent;
}
.unbutton {
background: none;
border: 0;
padding: 0;
margin: 0;
font: inherit;
cursor: pointer;
color: var(--color-link);
}
.unbutton:focus {
outline: none;
}
.frame {
padding: 2.5rem;
display: grid;
position: fixed;
width: 100%;
height: 100vh;
z-index: 100;
pointer-events: none;
grid-template-columns: auto auto;
grid-template-rows: auto auto auto 1fr;
grid-gap: 1rem;
grid-template-areas: 'back sponsor' 'title title' 'info info' 'nav nav';
}
.frame a {
pointer-events: auto;
}
.frame__title {
grid-area: title;
align-self: end;
justify-self: end;
display: flex;
align-items: start;
}
.frame__title-main {
font-size: 1rem;
margin: 0 0 0 1rem;
font-weight: normal;
}
.frame__title-back {
position: relative;
display: flex;
align-items: flex-end;
margin-bottom: 0.15rem;
}
.frame__title-back span {
transform: rotate(-45deg);
font-size: 1.25rem;
line-height: 1;
}
.frame__title-back svg {
fill: currentColor;
}
.frame__info {
grid-area: info;
align-self: end;
}
.frame__nav {
grid-area: nav;
display: grid;
grid-auto-flow: row;
place-items: start;
align-content: end;
grid-gap: 0.5rem;
}
.frame__nav-button {
text-transform: uppercase;
position: relative;
transition: color 0.3s;
pointer-events: auto;
}
.frame__nav-button:not(.frame__nav-button--current):hover {
color: var(--color-link-hover);
}
.frame__nav-button--current {
color: var(--color-text);
}
.frame__nav-button::before {
content: '';
width: 2.5rem;
height: 1px;
top: 50%;
background-color: currentColor;
position: absolute;
right: calc(100% + 4px);
transform-origin: 100% 50%;
transform: scaleX(0);
transition: transform 0.8s ease-in-out;
}
.frame__nav-button--current::before {
transform: scaleX(1);
}
.frame__back {
grid-area: back;
justify-self: start;
opacity: 0;
pointer-events: none;
text-transform: uppercase;
}
.frame__back--show {
opacity: 1;
pointer-events: auto;
}
.slides {
width: 100%;
height: 100vh;
overflow: hidden;
display: grid;
grid-template-rows: 100%;
grid-template-columns: 100%;
place-items: center;
}
.slide {
width: 100%;
height: 104%;
grid-area: 1 / 1 / -1 / -1;
pointer-events: none;
opacity: 0;
overflow: hidden;
position: relative;
will-change: transform;
}
.slide--current {
pointer-events: auto;
opacity: 1;
}
.slide__inner {
width: 100%;
height: 100%;
display: grid;
grid-template-rows: 100%;
grid-template-columns: 100%;
position: relative;
overflow: hidden;
will-change: transform;
}
.slide__img {
grid-area: 1 / 1 / -1 / -1;
overflow: hidden;
position: relative;
cursor: pointer;
z-index: 1;
}
.slide__img-inner {
width: 100%;
height: 100%;
background-size: cover;
background-position: 50% 50%;
background-repeat: no-repeat;
will-change: transform;
}
.slide__content {
grid-area: 1 / 1 / -1 / -1;
display: grid;
background: var(--color-bg-slide);
align-content: center;
justify-content: center;
display: grid;
padding: 1rem;
grid-template-rows: auto auto auto;
grid-template-columns: 1fr 1fr;
grid-column-gap: 2rem;
grid-template-areas: 'img title' 'img text' 'img ...' ;
}
.slide__content-img {
height: 300px;
background-size: cover;
background-position: 50% 50%;
grid-area: img;
will-change: transform;
}
.slide__content h2 {
grid-area: title;
font-weight: 200;
font-size: clamp(3rem,2vw,3rem);
text-transform: none;
margin: 0 0 3rem 0;
line-height: 1;
}
.slide__content p {
grid-area: text;
max-width: 260px;
line-height: 1.5;
margin: 0;
color: rgba(255,255,255,0.5);
}
.cursor {
position: absolute;
top: 0;
left: 0;
pointer-events: none;
}
@media screen and (min-width: 53em) {
.frame {
grid-template-columns: auto auto auto;
grid-template-rows: auto auto;
grid-template-areas: 'back ... sponsor' 'nav info title';
align-content: space-between;
}
.frame__info {
justify-self: center;
}
.slide__content {
grid-template-rows: auto auto auto;
grid-template-columns: 220px 300px;
grid-column-gap: 2rem;
grid-template-areas: 'img title' 'img text' 'img ...' ;
}
}
src/index.html
<!DOCTYPE html>
<html lang="en" class="no-js">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Fullscreen Scrolling Slideshow | Codrops</title>
<meta name="description" content="A fullscreen scroll-based slideshow with a content view powered by GreenSock's Observer plugin." />
<meta name="keywords" content="observer plugin, gsap, scrolling, slideshow" />
<meta name="author" content="Codrops" />
<link rel="shortcut icon" href="favicon.ico">
<link rel="stylesheet" href="https://use.typekit.net/zns7sax.css">
<link rel="stylesheet" type="text/css" href="css/base.css" />
<script>document.documentElement.className="js";var supportsCssVars=function(){var e,t=document.createElement("style");return t.innerHTML="root: { --tmp-var: bold; }",document.head.appendChild(t),e=!!(window.CSS&&window.CSS.supports&&window.CSS.supports("font-weight","var(--tmp-var)")),t.parentNode.removeChild(t),e};supportsCssVars()||alert("Please view this demo in a modern browser that supports CSS Variables.");</script>
<script src="//tympanus.net/codrops/adpacks/analytics.js"></script>
</head>
<body class="loading">
<main>
<div class="frame">
<div class="frame__title">
<a class="frame__title-prev" href="https://tympanus.net/Development/ImageToContent/">Previous demo</a>
<h1 class="frame__title-main">Fullscreen Scrolling Slideshow</h1>
<a aria-label="Back to the article" class="frame__title-back" href="https://tympanus.net/codrops/?p=64521"><span>→</span></a>
</div>
<nav class="frame__nav">
<button class="frame__nav-button unbutton">Stronger</button>
<button class="frame__nav-button unbutton">No choice</button>
<button class="frame__nav-button unbutton">Owned no longer</button>
<button class="frame__nav-button unbutton">Assert control</button>
<button class="frame__nav-button unbutton">Cold & detached</button>
</nav>
<button class="frame__back unbutton">
<span data-splitting>← Go back</span>
</button>
<span class="frame__info">↓ Scroll or drag ↓</span>
</div>
<div class="slides">
<div class="slide">
<div class="slide__inner">
<div class="slide__img"><div class="slide__img-inner" style="background-image:url(img/1.jpg)"></div></div>
<div class="slide__content">
<div class="slide__content-img" style="background-image:url(img/1.jpg)"></div>
<h2>Stronger</h2>
<p>You strung me along, I thought I was strong, but now you have pushed me under. I’ve opened my eyes, and counted the lies, now it is clearer to me. You are just a user, and an abuser, and I refuse to take it.</p>
</div>
</div>
</div>
<div class="slide">
<div class="slide__inner">
<div class="slide__content">
<div class="slide__content-img" style="background-image:url(img/2.jpg)"></div>
<h2>No choice</h2>
<p>Fall into line, you will do as you’re told. No choice fatigue, your blood is running cold. We lose control, the world will fall apart.</p>
</div>
<div class="slide__img"><div class="slide__img-inner" style="background-image:url(img/2.jpg)"></div></div>
</div>
</div>
<div class="slide">
<div class="slide__inner">
<div class="slide__content">
<div class="slide__content-img" style="background-image:url(img/3.jpg)"></div>
<h2>Owned no longer</h2>
<p>We need a transmutation. One we all conceive. We need a revolution. So long as we stay free.</p>
</div>
<div class="slide__img"><div class="slide__img-inner" style="background-image:url(img/3.jpg)"></div></div>
</div>
</div>
<div class="slide">
<div class="slide__inner">
<div class="slide__content">
<div class="slide__content-img" style="background-image:url(img/4.jpg)"></div>
<h2>Assert control</h2>
<p>Cornered, I’m exhausted with fear. Our love and compassion dissolved. And demons, have materialised in me. Can’t fight them, they’re taking control.</p>
</div>
<div class="slide__img"><div class="slide__img-inner" style="background-image:url(img/4.jpg)"></div></div>
</div>
</div>
<div class="slide">
<div class="slide__inner">
<div class="slide__content">
<div class="slide__content-img" style="background-image:url(img/5.jpg)"></div>
<h2>Cold & detached</h2>
<p>Fate has brought us here to face. Our hopes and dreams erased. Either kill or be killed.</p>
</div>
<div class="slide__img"><div class="slide__img-inner" style="background-image:url(img/5.jpg)"></div></div>
</div>
</div>
</div>
<div class="cursor">
<span class="cursor__text" data-splitting>+ Discover more</span>
</div>
</main>
<script src="https://tympanus.net/codrops/adpacks/cda_sponsor.js"></script>
<script type="module" src="js/index.js"></script>
</body>
</html>
함께 쓰는 파일 7개 보기
src/js/cursor.js
import { lerp, getCursorPos } from './utils';
// Track the cursor position
let cursor = {x: 0, y: 0};
window.addEventListener('mousemove', ev => cursor = getCursorPos(ev));
/**
* Class representing a .cursor element
*/
export class CursorText {
// DOM elements
DOM = {
// Main element (.cursor)
el: null,
// Inner element (.cursor__text)
text: null,
}
// Element style properties
renderedStyles = {
// With interpolation, we can achieve a smooth animation effect when moving the cursor.
// The "previous" and "current" values are the values that will interpolate.
// The returned value will be one between these two (previous and current) at a specific increment.
// The "amt" is the amount to interpolate.
// As an example, the following formula calculates the x-axis translation value to apply to the cursor element:
// this.renderedStyles.tx.previous = lerp(this.renderedStyles.tx.previous, this.renderedStyles.tx.current, this.renderedStyles.tx.amt);
// translation values
// The lower the amt, the slower the cursor "follows" the user gesture
tx: {previous: 0, current: 0, amt: 0.15},
ty: {previous: 0, current: 0, amt: 0.15},
};
// Element size and position
bounds;
/**
* Constructor.
*/
constructor(DOM_el) {
this.DOM.el = DOM_el;
this.DOM.text = this.DOM.el.querySelector('.cursor__text');
// Hide it initially
this.DOM.el.style.opacity = 0;
// Calculate size and position
this.bounds = this.DOM.el.getBoundingClientRect();
for (const key in this.renderedStyles) {
this.renderedStyles[key].amt = this.DOM.el.dataset.amt || this.renderedStyles[key].amt;
}
// Show the element and start tracking its position as soon as the user moves the cursor.
const onMouseMoveEv = () => {
// Set up the initial values to be the same
this.renderedStyles.tx.previous = this.renderedStyles.tx.current = cursor.x + 20;
this.renderedStyles.ty.previous = this.renderedStyles.ty.previous = cursor.y - this.bounds.height/2;
// Show it
this.DOM.el.style.opacity = 1;
// Start rAF loop
requestAnimationFrame(() => this.render());
// Remove the initial mousemove event
window.removeEventListener('mousemove', onMouseMoveEv);
};
window.addEventListener('mousemove', onMouseMoveEv);
}
/**
* Loop / Interpolation
*/
render() {
// New cursor positions
this.renderedStyles['tx'].current = cursor.x + 20;
this.renderedStyles['ty'].current = cursor.y - this.bounds.height/2;
// Interpolation
for (const key in this.renderedStyles ) {
this.renderedStyles[key].previous = lerp(this.renderedStyles[key].previous, this.renderedStyles[key].current, this.renderedStyles[key].amt);
}
// Apply interpolated values (smooth effect)
this.DOM.el.style.transform = `translateX(${(this.renderedStyles['tx'].previous)}px) translateY(${this.renderedStyles['ty'].previous}px)`;
// loop...
requestAnimationFrame(() => this.render());
}
}src/js/index.js
import { gsap } from 'gsap';
import "splitting/dist/splitting.css";
import "splitting/dist/splitting-cells.css";
import Splitting from "splitting";
import { preloadImages } from './utils';
import { CursorText } from './cursor';
import { Slide } from './slide';
import { Observer } from 'gsap/Observer.js';
gsap.registerPlugin(Observer);
// Call the splittingjs to transform the data-splitting texts to spans of chars
Splitting();
// Some DOM elements
const DOM = {
slides: [...document.querySelectorAll('.slide')],
cursor: document.querySelector('.cursor'),
backCtrl: document.querySelector('.frame__back'),
navigationItems: document.querySelectorAll('.frame__nav > .frame__nav-button'),
};
// cursor text chars
DOM.cursorChars = DOM.cursor.querySelectorAll('.word > .char, .whitespace');
// backCtrl text chars
DOM.backChars = DOM.backCtrl.querySelectorAll('.word > .char, .whitespace');
// total number of slides
const totalSlides = DOM.slides.length;
let slidesArr = [];
DOM.slides.forEach(slide => {
slidesArr.push(new Slide(slide));
});
// current slide position
let current = -1;
// check if animation is in progress
let isAnimating = false;
const setCurrentSlide = position => {
if ( current !== -1 ) {
slidesArr[current].DOM.el.classList.remove('slide--current');
}
current = position;
slidesArr[current].DOM.el.classList.add('slide--current');
DOM.navigationItems[current].classList.add('frame__nav-button--current');
};
const next = () => {
const newPosition = current < totalSlides - 1 ? current + 1 : 0;
navigate(newPosition);
};
const prev = () => {
const newPosition = current > 0 ? current - 1 : totalSlides - 1;
navigate(newPosition);
};
const navigate = newPosition => {
isAnimating = true;
// change navigation current class
DOM.navigationItems[current].classList.remove('frame__nav-button--current');
DOM.navigationItems[newPosition].classList.add('frame__nav-button--current');
// navigation direction
const direction = current < newPosition ? current === 0 && newPosition === totalSlides - 1 ? 'prev' : 'next' : current === totalSlides - 1 && newPosition === 0 ? 'next' : 'prev';
const currentSlide = slidesArr[current];
current = newPosition;
const upcomingSlide = slidesArr[current];
gsap.timeline({
defaults: {
duration: 1.6,
ease: 'power3.inOut'
},
onComplete: () => {
currentSlide.DOM.el.classList.remove('slide--current');
// Close the current slide if it was open
if ( currentSlide.isOpen ) {
hideContent(currentSlide);
}
isAnimating = false;
}
})
.addLabel('start', 0)
.set([currentSlide.DOM.imgInner, upcomingSlide.DOM.imgInner], {
transformOrigin: direction === 'next' ? '50% 0%' : '50% 100%'
}, 'start')
// Place coming slide either above (translate -100%) or below (translate 100%) and the slide__inner to the opposite translate.
.set(upcomingSlide.DOM.el, {
yPercent: direction === 'next' ? 100 : -100
}, 'start')
.set(upcomingSlide.DOM.inner, {
yPercent: direction === 'next' ? -100 : 100
}, 'start')
// Add current class
.add(() => {
upcomingSlide.DOM.el.classList.add('slide--current');
}, 'start')
// hide the back button and show back the cursor text if the current slide was open
.add(() => {
if ( currentSlide.isOpen ) {
toggleCursorBackTexts();
}
}, 'start')
// Current slide moves either up or down (translate 100% or -100%)
.to(currentSlide.DOM.el, {
yPercent: direction === 'next' ? -100 : 100
}, 'start')
.to(currentSlide.DOM.imgInner, {
scaleY: 2
}, 'start')
// Upcoming slide translates to 0
.to([upcomingSlide.DOM.el, upcomingSlide.DOM.inner], {
yPercent: 0
}, 'start')
.to(upcomingSlide.DOM.imgInner, {
ease: 'power2.inOut',
startAt: {scaleY: 2},
scaleY: 1
}, 'start')
};
const toggleCursorBackTexts = isContent => {
return gsap.timeline({
onStart: () => {
gsap.set(DOM.backChars, {opacity: isContent ? 0 : 1});
if ( isContent ) {
DOM.backCtrl.classList.add('frame__back--show');
}
},
onComplete: () => {
DOM.backCtrl.classList[isContent ? 'add' : 'remove']('frame__back--show');
if ( !isContent ) {
DOM.backCtrl.classList.remove('frame__back--show');
}
}
})
.to(DOM.cursorChars, {
duration: 0.1,
ease: 'expo',
opacity: isContent ? 0 : 1,
stagger: {
amount: 0.5,
grid: 'auto',
from: 'random'
}
})
.to(DOM.backChars, {
duration: 0.1,
ease: 'expo',
opacity: isContent ? 1 : 0,
stagger: {
amount: 0.5,
grid: 'auto',
from: 'random'
}
}, 0);
};
const showContent = position => {
if ( isAnimating ) return;
isAnimating = true;
const slide = slidesArr[position];
slide.isOpen = true;
gsap.timeline({
defaults: {
duration: 1.6,
ease: 'power3.inOut'
},
onStart: () => {
},
onComplete: () => {
isAnimating = false;
}
})
.addLabel('start', 0)
.add(() => {
toggleCursorBackTexts('content');
}, 'start')
.to(slide.DOM.img, {
yPercent: -100
}, 'start')
.set(slide.DOM.imgInner, {
transformOrigin: '50% 100%'
}, 'start')
.to(slide.DOM.imgInner, {
yPercent: 100,
scaleY: 2
}, 'start')
.to(slide.DOM.contentImg, {
startAt: {
transformOrigin: '50% 0%',
scaleY: 1.5
},
scaleY: 1
}, 'start')
};
const hideContent = (slide, animate = false) => {
// reset values
isAnimating = true;
const complete = () => {
slide.isOpen = false;
isAnimating = false;
};
if ( animate ) {
gsap.timeline({
defaults: {
duration: 1.6,
ease: 'power3.inOut'
},
onComplete: complete
})
.addLabel('start', 0)
.to(slide.DOM.img, {
yPercent: 0
}, 'start')
.to(slide.DOM.imgInner, {
yPercent: 0,
scaleY: 1
}, 'start');
}
else {
gsap.set(slide.DOM.img, {
yPercent: 0
});
gsap.set(slide.DOM.imgInner, {
yPercent: 0,
scaleY: 1
});
complete();
}
};
const initEvents = () => {
// Links navigation
[...DOM.navigationItems].forEach((item, position) => {
item.addEventListener('click', () => {
if ( current === position || isAnimating ) return;
navigate(position);
});
});
// Back click
DOM.backCtrl.addEventListener('click', () => {
if ( isAnimating ) return;
isAnimating = true;
toggleCursorBackTexts();
hideContent(slidesArr[current], true);
});
// Initialize the GSAP Observer plugin
Observer.create({
type: 'wheel,touch,pointer',
onDown: () => !isAnimating && prev(),
onUp: () => !isAnimating && next(),
// invert the mouse wheel delta
wheelSpeed: -1,
tolerance: 10
});
for (const [position, slide] of slidesArr.entries()) {
slide.DOM.img.addEventListener('click', () => {
showContent(position);
});
}
};
// Set current slide
setCurrentSlide(0);
// Initialize custom cursor
new CursorText(DOM.cursor);
// Initialize the events
initEvents();
// Preload images and initialize scrolling animations
preloadImages('.slide__img-inner').then( _ => {
document.body.classList.remove('loading');
});src/js/slide.js
/**
* Class representing a Slide element (.slide)
*/
export class Slide {
// DOM elements
DOM = {
// main element (.slide)
el: null,
// slide inner element (.slide__inner)
inner: null,
// slide image element (.slide__img)
img: null,
// slide image inner element (.slide__img-inner)
imgInner: null,
// slide content element (.slide__content)
content: null,
// slide content image (slide__content-img)
contentImg: null,
// other content elements besides the image
contentTexts: null,
};
/**
* Constructor.
* @param {Element} DOM_el - main element (.slide)
*/
constructor(DOM_el) {
this.DOM.el = DOM_el;
this.DOM.inner = this.DOM.el.querySelector('.slide__inner');
this.DOM.img = this.DOM.el.querySelector('.slide__img');
this.DOM.imgInner = this.DOM.el.querySelector('.slide__img-inner');
this.DOM.content = this.DOM.el.querySelector('.slide__content');
this.DOM.contentImg = this.DOM.content.querySelector('.slide__content-img');
this.DOM.contentTexts = [...this.DOM.content.children].filter(item => item != this.DOM.contentImg);
}
}src/js/utils.js
const imagesLoaded = require('imagesloaded');
/**
* Preload images
* @param {String} selector - Selector/scope from where images need to be preloaded. Default is 'img'
*/
const preloadImages = (selector = 'img') => {
return new Promise((resolve) => {
imagesLoaded(document.querySelectorAll(selector), {background: true}, resolve);
});
};
/**
* Linear interpolation
* @param {Number} a - first value to interpolate
* @param {Number} b - second value to interpolate
* @param {Number} n - amount to interpolate
*/
const lerp = (a, b, n) => (1 - n) * a + n * b;
/**
* Gets the cursor position
* @param {Event} ev - mousemove event
*/
const getCursorPos = ev => {
return {
x : ev.clientX,
y : ev.clientY
};
};
export {
preloadImages,
lerp,
getCursorPos,
};Media credits and license evidence실행 안내·자료
README.md
## Credits
- Images from [Unsplash](https://unsplash.com/)
## License
[MIT](LICENSE)
Made with :blue_heart: by [Codrops](http://www.codrops.com)
LICENSE실행 안내·자료
MIT License
Copyright (c) 2009 - 2021 [Codrops](https://tympanus.net/codrops)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Bundled dependency licenses실행 안내·자료
GSAP standard license snapshot
Source: https://gsap.com/community/standard-license/
Retrieved: 2026-09-22T04:22:49.089Z
Original distribution copyright and version headers remain in the runtime code.
Standard "No Charge" GSAP License
I. DEFINITIONS
“GSAP License” means the terms and conditions of this GSAP Software License Agreement.
"GSAP Products" means any Software made available at gsap.com (https://gsap.com) or any successor sites, including but not limited to the GSAP animation library and related plugins, tools, or extensions.
"Permitted Uses" means the implementation and/or use of GSAP Products on any website, web application, or digital interface by any person or entity (which may include, for clarity, those of companies that compete with Webflow in other areas of business).
"Prohibited Uses" means any implementation and/or use of GSAP Products in tools that allow users to build visual animations without code that encourages, induces, or materially assists in creating a solution that competes with Webflow’s visual animation building capabilities.
"Competitive Products" means any software, tool, or service that enables users to create, edit, or manage animations through a visual interface or builder similar to Webflow (https://webflow.com).
II. GRANT OF LICENSE
Subject to the terms and conditions of this GSAP License, Webflow grants you a non-exclusive, worldwide license to use, reproduce, display, and implement GSAP Products solely for Permitted Uses.
III. RESTRICTIONS
You may not:
Use any GSAP Products for any Prohibited Uses without prior written consent;
Reverse engineer any GSAP Products for the purpose of creating Competitive Products;
Remove or alter any proprietary notices or branding from GSAP Products.
IV. OWNERSHIP AND INTELLECTUAL PROPERTY
All intellectual property rights in GSAP Products, including but not limited to copyright, patents, trademarks, and trade secrets, remain the exclusive property of Webflow. This GSAP License does not transfer any ownership rights in GSAP Products to you.
V. TERMINATION
Webflow may terminate this GSAP License and revoke your access in its discretion if you fail to comply with any of these terms and conditions. Upon termination, you must cease all use of GSAP Products and destroy all copies in your possession.
VI. MISCELLANEOUS PROVISIONS
General: This GSAP License is incorporated into and subject to Webflow’s Terms of Service available here (https://webflow.com/legal/terms) ("Terms of Service"). In the event of any conflict or inconsistency between this GSAP License and the Terms of Service, the terms of this GSAP License shall govern in relation to your use of any GSAP Products.
Amendments: Webflow reserves the right to update or modify this GSAP License at any time by posting the revised terms on this website, provided that any such updates or modifications shall not result in any material degradation to the security, integrity, or functionality of any GSAP Products. You understand and agree that your continued use of any GSAP Products after such revisions to this GSAP License constitutes your acceptance of this GSAP License as revised. If you do not accept the revised GSAP License, you are prohibited from using versions of the GSAP Products released after the effective date of the revised GSAP License (as well as any updates made to previous versions). Notwithstanding, you may continue using previous versions of GSAP Products under the applicable terms licensed to you prior to the effective date of the revised GSAP License (for clarity, excluding any updates made thereto).
No Waiver: Failure of Webflow to enforce any provision of this GSAP License shall not constitute a waiver of future enforcement of that or any other provision.
FAQ
Is it acceptable for AI tools like ChatGPT, Cursor, Lovable, Webstudio, etc. to generate GSAP code?
Absolutely! AI-generated code is not a "Prohibited Use".
What if a WordPress plugin or theme or other niche tool allows users to create GSAP-driven effects through a visual interface? Is that prohibited?
We want to encourage developers to build on top of GSAP, including visual tools that don't directly compete with Webflow's rich animation-building capabilities. If you are not sure if your product might be considered a "Prohibited Use", feel free to contact us (https://gsap.com/contact) so we can talk through it!
Can I really use GSAP in commercial projects without paying anything?
Yes, really! Commercial usage is covered under the standard license. All of GSAP including the plugins that were formerly "members-only" like SplitText (https://gsap.com/docs/v3/Plugins/SplitText/) and MorphSVG (https://gsap.com/docs/v3/Plugins/MorphSVGPlugin) can be used in commercial projects at no charge. Enjoy! 💚
Effective date: April 30, 2025
Last modified date: May 30, 2025
Copyright (©) 2025, Webflow
splitting@1.1.0 — LICENSE.md
MIT License
Copyright (c) 2018 Stephen Shaw
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
ev-emitter@2.1.2 — LICENSE.md
Copyright (c) 2016-2021 [David DeSandro](https://desandro.com)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
imagesloaded@5.0.0 — LICENSE.md
Copyright (c) 2011-2022 [David DeSandro](https://desandro.com) and [contributors](https://github.com/desandro/imagesloaded/graphs/contributors)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
BEHIND THE EXAMPLE
이 장면을 만드는 원리
슬라이드 이동과 열린 상세의 정리
반복 입력에서 현재 의도와 전환의 종료·취소 책임을 명시합니다.
- 이 예제에서는
- navigate는 내비게이션의 현재 표시를 먼저 바꾸고 이전 슬라이드의 상세가 열려 있으면 전환 완료 때 hideContent를 호출합니다.
