GSAP (GreenSock Animation Platform) is a powerhouse for building smooth, high-performance animations. This collection of GSAP examples highlights scroll-based animations, staggered effects, timelines, and SVG motion - all made effortless with GreenSock.
302 GSAP.js Examples
Interactive Canvas Particle Image Effect
demo & codeThis is an Interactive Canvas Particle Image Effect. It reconstructs standard raster images using thousands of autonomous floating particles. Its function is to create a highly tactile visual experience that reacts to cursor proximity, morphing colors based on hidden alternate image data to remove the static barrier between user and interface.
Interactive Physics-Based Dot Grid
demo & codeThis is an Interactive Physics-Based Dot Grid. It transforms a static matrix of circular DOM elements into a reactive, liquid-like surface. Its function is to provide an engaging, high-end visual toy or background element where the dots elastically pull toward the user’s cursor on hover, and dramatically explode outward with gravity-based physics upon clicking.
Animated SVG Penrose Triangle Loader
demo & codeThis is an Animated SVG Penrose Triangle Loader. It combines the impossible geometry of the Penrose triangle with a continuous circular spinner to create a hypnotic, high-fidelity loading animation. Its function is to provide a visually stunning and technically impressive waiting state for applications, using SVG filters and GSAP to add depth and motion.
Twisted Wave GLSL Image Gallery
demo & codeThis is a Twisted Wave GLSL Image Gallery. It’s a high-performance, full-screen WebGL experience that uses custom shaders to create sophisticated visual effects. Its function is to transform a standard image carousel into a cinematic journey with two distinct interactions: a localized sine-wave distortion on mouse hover and a global radial blur that intensifies with the speed of the scroll.
GSAP ScrollTrigger List Expansion
demo & codeThis snippet showcases a GSAP ScrollTrigger List Expansion effect. It mimics the native iOS “Notification Center” or “Wallet” card stack behavior. Its function is to condense a long list of items into a compact, layered visual stack, and then fluidly expand them into full, scrollable cards as the user scrolls down the container, creating a highly tactile mobile UI experience.
Interactive Morphing Task List Item
demo & codeThis Interactive Morphing Task List Item is a high-fidelity productivity component. It combines path interpolation with auditory feedback to validate user actions. Its function is to elevate simple “to-do” lists into rewarding, tactile experiences through state-driven motion.
Lenis Smooth Scroll & GSAP Page
demo & codeThis is a Lenis Smooth Scroll & GSAP Page. It transforms a standard one-page website into a high-end, cinematic scrolling experience. Its function is to provide an exceptionally fluid and responsive interface by replacing native “jumpy” browser scrolling with the physics-based smoothness of Lenis, while using GSAP’s ScrollTrigger to orchestrate a series of staggered animations that reveal content as the user navigates down the page.
Lenis Smooth Scroll Cinematic Experience
demo & codeThis is a Lenis Smooth Scroll Cinematic Experience. It transforms a standard single-page portfolio or narrative website into an immersive, high-end digital journey. Its primary function is to replace jarring browser scrolling with the fluid, physics-based motion of Lenis, while using GSAP’s ScrollTrigger plugin to orchestrate a complex sequence of cinematic animations, including a “film roll” header, an expanding video player, and a dramatic footer reveal.
3D Interactive MacBook Model
demo & codeThis is a 3D Interactive MacBook Model. It utilizes Three.js to load, texture, and animate a high-fidelity .glb model of a laptop. Its function is to create a premium, cinematic product showcase, replacing static hero images with a fully interactive WebGL scene that animates through a complex opening and booting-up sequence.
Animated Fruity Product Showcase
demo & codeThis is an Animated Fruity Product Showcase. It acts as a high-impact hero section for a product landing page. Its function is to create a sense of dynamic energy through synchronized GSAP animations, where product imagery “falls” into view, titles update with staggered transitions, and ripple-wave effects surround the navigation buttons.
Animated Power-Up Button
demo & codeThis is an Animated Power-Up Button. It replaces standard interaction states with a visually rich, multi-layered animation sequence. Upon clicking, the button rotates, and a series of semi-transparent shadow layers stagger-in behind it, creating a “motion blur” or “power-up” trail effect. Its function is to provide highly stylized feedback for high-impact actions.
Interactive Feather Reveal 404 Page
demo & codeThis is an Interactive Feather Reveal 404 Page. It utilizes the Canvas 2D API to transform a sterile error screen into a generative digital canvas. The component records user movement to stamp intricate feather-shaped paths that alternate between solid black fills and clipped fragments of external bird photography.
GSAP Magic Hover Areas
demo & codeThis is a GSAP Magic Hover Areas component. It creates an animated, floating background layer that physically tracks the user’s cursor or keyboard focus across different interactive elements on the page. It adds a cohesive, fluid spatial awareness to standard list items and navigation menus.
Neumorphic Drag Dial Thermostat
demo & codeThis is a Neumorphic Drag Dial Thermostat. It provides a tactile, skeuomorphic interface for setting numerical values (like temperature) through rotational dragging or keyboard input. The dial dynamically reveals cool-to-warm gradient colors based on the current value, enhancing the physical “feel” of a smart home control panel.
Tilt Grid Content Reveal
demo & codeThis is a Tilt Grid Content Reveal. It transforms a standard masonry image gallery into a highly interactive, spatial experience. Its function is to provide an engaging browsing interface where hovering induces physical 3D tilt, and clicking smoothly expands the thumbnail into a full-screen presentation, completely immersing the user in the selected content.
Animated Star Toggle Switch
demo & codeThis is an Animated Star Toggle Switch. It replaces a standard HTML checkbox with a highly expressive, character-driven micro-interaction. Its function is to provide emotional feedback to a binary choice (like “favorite” or “bookmark”), launching the star into the air where it physically morphs between a sad, grey orb and a happy, bright yellow star.
Shattering Image Gallery Transition
demo & codeThis is a Shattering Image Gallery Transition. It utilizes the WebGL API via Three.js to deconstruct 2D images into a matrix of 3D particles. Its function is to replace standard fade or slide slideshows with a highly cinematic, physics-based explosion effect, transitioning between photographs by blowing the current image apart to reveal the next one underneath.
Sci-Fi Reticule Play Button
demo & codeThis is a Sci-Fi Reticule Play Button. It replaces static interaction states with an immersive, HUD-like sequence. Its function is to trigger a process (like loading data or initializing an app) while providing real-time visual feedback through an animated percentage counter and expanding SVG geometry.
Smooth Scroll Stacking Accordion
demo & codeThis is a Smooth Scroll Stacking Accordion. It replaces standard click-to-open accordions with a scroll-driven interaction. Its function is to pin a section of content and compress multiple information cards into a stacked deck as the user scrolls down the page.
Morphing Blob Image Carousel
demo & codeThis is a Morphing Blob Image Carousel. It utilizes procedural geometry and GSAP to generate a continuously shifting SVG mask over an image slider. Its function is to break the rigid, rectangular grid of standard web layouts. The organic motion draws the eye, making the standard act of cycling through images feel fluid and tactile.
Morphing Liquid SVG Mask Button
demo & codeThis is a Morphing Liquid SVG Mask Button. It masks a raster image (marble texture) with a dynamic SVG shape that transforms into a “gooey” blob upon interaction. Its function is to create a high-end, organic reveal effect for primary calls-to-action, replacing standard rectangular hover states with fluid motion.
Smooth 3D Scroll-Driven Reveal
demo & codeThis is a Smooth 3D Scroll-Driven Reveal. It replaces the native scroll behavior with a custom, momentum-based scrolling engine that orchestrates complex 3D transforms. Its function is to create a gallery experience where images feel weightless, tilting and translating in 3D space based on their velocity and position relative to the viewport.
Animated Geometric GSAP Preloader
demo & codeThis is an Animated Geometric GSAP Preloader. It utilizes precise JavaScript timeline sequencing to manipulate three basic DOM elements into a shifting, continuous puzzle. Its function is to hold user attention during prolonged data fetching. The effect is heavily mechanical, converting simple CSS shapes into an illusion of complex, articulating parts.
Interactive Download Folder Animation
demo & codeThis is an Interactive Download Folder Animation. It replaces a static download button with a lively, physics-based micro-interaction. Its function is to provide immediate, satisfying visual confirmation of a user action. The effect drops a new document into a stacked folder, triggering a synchronized elastic bounce across multiple UI layers.
Liquid Filling Heart Interaction
demo & codeThis is a Liquid Filling Heart Interaction. It visualizes a “pumping” effect by animating a fluid level inside a heart-shaped container. Its function is to serve as a playful, interactive state indicator — like a “like” button or health bar — that responds to user clicks with a simulated hydraulic fill and a 3D perspective jolt.
Scroll-Driven Dynamic Marquee Frame
demo & codeThis is a Scroll-Driven Dynamic Marquee Frame. It creates a continuous perimeter ticker that bounds the viewport. Its function is to provide persistent context by reflecting the currently active section’s title. It transforms static reading into a reactive environment, updating both edge typography and core background colors as the user scrolls.
Pinned Split-Screen Mask Reveal
demo & codePinned Split-Screen Mask Reveal is a high-performance scroll-driven layout. It synchronizes fixed image stacks with flowing text content. This element creates a cinematic transition where images are “unmasked” as the user progresses through sections. It is designed to bridge the gap between static information and immersive visual storytelling.
Kinetic Arc Jump Pagination
demo & codePagination is often reduced to a blinking light — a teleportation of state. This component rejects that abstraction. It treats the active indicator as a physical object with mass and momentum. By forcing the dot to leap through space to reach its destination, we create a tactile narrative of travel. It transforms a mundane click into a playful, satisfying interaction that mimics the physics of a board game piece.
Animated Coffee Cup Sticker
demo & codeIn the sterile world of web interfaces, a touch of whimsy can be the difference between a user forgetting your site and remembering it with a smile. This snippet isn’t just an animation; it’s a digital sticker with a soul. It brings the static ritual of coffee to life through squash-and-stretch principles, transforming a simple icon into a living character that breathes, reacts, and delights.
Kinetic clip-path Text Rotator
demo & codeStatic text is a relic of print media. In the digital realm, typography should possess momentum and weight. This component transforms a standard headline into a kinetic event. By synchronizing rotation with advanced clipping masks, we create the illusion of text being physically “printed” or “wiped” into existence at high velocity. It is visceral, rhythmic, and designed to command attention without screaming.
Fluid Morphing List Expansion
demo & codeMost interfaces treat layout changes as abrupt cuts in a film — jarring and disconnected. We reject this. UI should behave like matter, conserving momentum and mass. This component demonstrates the “impossible”: animating a flexbox container from a horizontal row to a vertical column seamlessly. It creates a sense of spatial continuity that makes the application feel not like software, but like a living organism adapting to user intent.
Immersive 3D Tilt Card Modal
demo & codeWe accept flatness in web interfaces as a constraint, but it is merely a habit. This component breaks the fourth wall, transforming a static modal into a tangible, digital artifact. By coupling mouse physics with deep perspective, we create an interaction that feels less like clicking a link and more like holding a rare collectable.
Interactive Emotional Feedback Slider
demo & codeForms are traditionally cold and utilitarian. This component challenges that norm by injecting emotional intelligence into the user interface. By mapping a range slider to animated character states, we transform a simple data input into a conversation. It turns the abstract concept of “satisfaction” into a relatable, human narrative, encouraging users to engage more deeply with the feedback process.
Elastic Animated Star Rating
demo & codeThis Elastic Animated Star Rating component turns a mundane feedback form into a delightful micro-interaction. Instead of simple color changes, the stars spring to life with a satisfying “elastic” pop when clicked. The animation logic handles both filling (bouncing in) and emptying (shrinking away) states, making the interaction feel physically responsive and engaging.
GSAP Staggered Blinds Reveal
demo & codeThis GSAP Staggered Blinds Reveal creates a cinematic transition effect often used in hero sections or between major content blocks. By manipulating a series of div elements acting as “slats,” the animation mimics a zipper or venetian blinds opening. As the user scrolls, the slats slide away and rotate sequentially, revealing the content underneath (or changing the state) in a synchronized wave motion.
Morphing Liquid Toggle Switch
demo & codeThis Morphing Liquid Toggle Switch takes the standard UI control to a new level of polish. Instead of a rigid circle sliding back and forth, the handle behaves like a viscous fluid. When toggled, it stretches, snaps, and settles into place with a satisfying elastic bounce, creating a delightful tactile experience for the user.
Parallax Jungle Leaves Reveal
demo & codeThis Parallax Jungle Leaves Reveal creates a cinematic opening for a landing page. As the user scrolls, dense layers of tropical SVG leaves part ways - some moving left, some right - while smaller leaves float randomly in the background. The effect culminates in the reveal of a typography-based logo, creating a sense of depth and discovery perfect for storytelling or adventure-themed websites.
Scroll-Triggered Text Highlights
demo & codeThis Scroll-Triggered Text Highlight effect mimics the experience of marking important passages with a highlighter pen as you read. Using GSAP ScrollTrigger, the highlights animate seamlessly from left to right exactly when the text enters the reader’s viewport. The component offers multiple visual styles (full background, half-height, or underline) and fully supports dark mode, making it an excellent addition to long-form articles, documentation, or educational content.
Interactive SVG Color Wheel
demo & codeThis Interactive SVG Color Wheel is a sophisticated design tool built directly into the browser. It allows users to explore color harmonies - Analogous, Complementary, Triadic, Tetradic - by dragging a handle across a mathematically generated wheel. The interface reacts instantly, updating the background, UI elements, and data display with the selected palette, powered by the precision of Chroma.js and GSAP animations.
3D Rotating iOS Time Picker
demo & codeThis 3D Rotating iOS Time Picker recreates the tactile feel of native mobile controls on the web. It features three independently rotating wheels (Hours, Minutes, Meridiem) that snap into place with satisfying physics. The component leverages the cutting-edge Scroll-driven Animations API for buttery-smooth performance on supported browsers, while seamlessly falling back to GSAP for others. The 3D perspective creates a “drum” effect where numbers fade and rotate away as they leave the center view.
Neon Elastic Stroke Radio Button
demo & codeThis Neon Elastic Stroke Radio Button reimagines the standard form input as a high-energy, futuristic interface element. When selected, two overlapping SVG circles (one pink, one blue) animate around the checkmark area with a satisfying elastic “bounce.” The effect mimics a neon light tube flickering on, enhanced by CSS drop-shadow filters and mix-blend-mode for a vibrant, glowing finish.
Scroll-Driven Image Swapper
demo & codeThis Scroll-Driven Image Swapper demonstrates the bleeding edge of web animation. It uses the native CSS Scroll-driven Animations API to create a complex parallax-like effect where two columns of different heights scroll in sync. As you scroll, the images in the shorter column slide and crossfade to match the context of the taller column. Crucially, the code implements a Progressive Enhancement strategy: it checks for native browser support and falls back to GSAP ScrollTrigger for browsers that haven’t implemented the spec yet.
Staggered Panel Curtain Menu
demo & codeThe Staggered Panel Curtain Menu is a creative full-screen navigation concept that breaks the traditional “fade-in” mold. It uses a series of vertical panels that drop down at slightly different intervals, creating a sophisticated “curtain” reveal. This effect is achieved by combining the precision of GSAP with the flexibility of CSS clip-path and variable fonts, making it an ideal choice for high-end creative portfolios or modern agency websites.
GSAP Flip Layout Expansion
demo & codeThis GSAP Flip Layout Expansion demonstrates how to animate complex layout changes that are usually impossible with pure CSS. By utilizing the FLIP (First, Last, Invert, Play) technique via GSAP, a list item transforms from a horizontal row into a vertical, detailed card. It smoothly handles the resizing of nested elements (like the avatar) and the repositioning of surrounding items without jumpy reflows.
Tearing Paper Photo Gallery
demo & codeThis Tearing Paper Photo Gallery is a technical marvel that simulates the physical act of ripping a photograph in half. Unlike simple 2D masking effects, this component uses WebGL (Three.js) to deform the geometry in 3D space. As the user drags downward, the “paper” mesh splits, rotates, and tears along a procedural edge, complete with lighting and shadow effects generated by custom shaders.
Draggable 3D Cube with Dynamic Lighting
demo & codeThis Draggable 3D Cube goes beyond standard CSS 3D transforms by implementing a custom “lighting engine” using JavaScript. As the user drags to rotate the carousel, the opacity of each face is dynamically calculated based on its angle relative to the viewport. This creates a realistic shading effect - faces facing the viewer are bright and fully opaque, while those turning away fade into the background, enhancing the perception of depth without using WebGL.
Draggable 3D Parallax Image Ring
demo & codeThis Draggable 3D Parallax Image Ring creates a high-end, immersive gallery experience often associated with WebGL, but built entirely with DOM elements and GSAP. It arranges images in a 3D circle that users can spin with a swipe or mouse drag. The standout feature is the calculated parallax effect: as the ring rotates, the background position of each image shifts in the opposite direction, creating a convincing illusion of depth and window-like transparency.
Interactive 3D Photo Cube
demo & codeThis Interactive 3D Photo Cube creates a spatial navigation experience where a user explores six images mapped onto a cube by moving their cursor. Unlike standard sliders, it utilizes CSS 3D transforms orchestrated by GSAP to create a seamless, physics-like rotation. The snippet also features a “window-pane” parallax effect where the background images shift slightly inside their frames, adding an extra layer of depth.
WebGL Voronoi Particle Transition
demo & codeThis WebGL Voronoi Particle Transition is a cutting-edge visual effect that reimagines the standard image slider. Instead of manipulating DOM elements or simple textures, it converts images into a massive system of particles (one for every pixel). During transitions, these particles are subjected to a mathematical storm driven by Voronoi diagrams, creating a liquid, swirling distortion effect that feels organic and computational.
Elastic SVG Morphing Form Controls
demo & codeThis Elastic SVG Morphing Form Controls set redefines standard UI elements by treating them as organic, malleable shapes. Instead of rigid CSS transitions, it utilizes GSAP’s MorphSVGPlugin to physically warp the vector paths of checkboxes, radio buttons, and switches during interaction. The result is a tactile, “gummy” feel where elements squish upon clicking and snap elastically into their active states.
GSAP SVG Circle Unwrapping Animation
demo & codeThis GSAP SVG Circle Unwrapping Animation is a masterclass in visual sleight of hand. Instead of mathematically morphing a curved path into a straight line (which often results in distorted, unappealing stroke widths), this component creates a seamless illusion. It splits a circle into two halves and synchronizes their movement with a dynamically generated straight line, making it appear as though the circle is being physically unrolled or “unwrapped” like a ribbon.
GSAP Sparkle Generate Button
demo & codeThis GSAP Sparkle Generate Button adds a touch of magic to standard call-to-action elements. Designed for AI generation tools or creative apps, it features a sophisticated hover effect where particles (dots) spawn and float organically around the button. The animation is driven by GreenSock’s Physics2DPlugin, simulating gravity and velocity for a realistic “dust” movement.