Event Planning Website
A venue booking website that uses scroll-driven motion to introduce the space and a separate flow to select dates and times.

I wanted the landing page to take visitors through the venue at their own pace. I built the scroll behavior around that idea: page movement controls the venue animation, while the gallery and booking flow are available when the visitor wants to inspect details or choose a date.
Tying a Lottie sequence to scroll position
GSAP ScrollTrigger maps the animation section to a range on the page. I turn off Lottie autoplay and use GSAP to advance a frame counter after the animation loads. The update handler displays the corresponding Lottie frame, so the sequence can move backward when the visitor scrolls back. Scrubbing controls how smoothly the animation follows the scroll.
animation = lottie.loadAnimation({
container: target,
renderer: vars.renderer || 'svg',
loop: false,
autoplay: false,
path: vars.path,
rendererSettings: vars.rendererSettings || {
preserveAspectRatio: 'xMidYMid slice',
},
});
for (let p in vars) {
st[p] = vars[p];
}
animation.addEventListener("DOMLoaded", function() {
let createTween = function () {
animation.frameTween = gsap.to(playhead, {
frame: animation.totalFrames - 1,
ease: 'none',
onUpdate: () => animation.goToAndStop(playhead.frame, true),
scrollTrigger: st,
});
return () => animation.destroy && animation.destroy();
};
ctx && ctx.add ? ctx.add(createTween) : createTween();
});Keeping touch scroll and gallery controls in sync
The gallery supports manual horizontal scroll and arrow buttons. After a scroll gesture settles, it divides the offset by the current viewport width and rounds to the nearest slide. That index controls which arrows are enabled. On resize, the gallery keeps the same index using the new width.
let scrollEndTimer = null;
gallery.addEventListener('scroll', () => {
// clear previous timer
if (scrollEndTimer) clearTimeout(scrollEndTimer);
// short debounce — choose 80-150ms as you prefer
scrollEndTimer = setTimeout(() => {
const slideWidth = gallery.clientWidth || 1; // avoid divide-by-zero
// round to nearest slide index
const index = Math.round(gallery.scrollLeft / slideWidth);
currentIndex = Math.max(0, Math.min(index, slideCount - 1));
onIndexChanged(currentIndex);
}, 120);
});
// --- handle resize (recalculate if viewport size changes) ---
window.addEventListener('resize', () => {
// After resize, jump to the correct position for the current index
// (use instant behavior to avoid weird animation during resize)
const slideWidth = gallery.clientWidth;
gallery.scrollTo({ left: currentIndex * slideWidth, behavior: 'instant' });
});Moving from exploration to booking
The booking screen distinguishes fully and partially booked dates and calculates an hourly estimate from the selected times. It uses browser-side sample availability, so the case study focuses on the visitor flow and scroll interaction.
What I learned
Scroll works best here when the visitor can understand what it controls. I used it to pace the venue introduction, then switched to explicit controls for choosing a date and time.