Awesome Mouse Spotlight Effect in JS & GreenSock

DesignCourse on YouTubeWatch on YouTube

SaveMark complete

Sign in to save videos and track what you’ve finished.

IntermediateUI14 min

About this video

This tutorial shows how to build a spotlight effect that follows the mouse and grows, using GreenSock and JavaScript. It duplicates a section of content, alters one copy, and uses a clip-path to create the spotlight. It is aimed at people learning front-end implementation of interface effects.

What you’ll learn

  • Build the HTML and CSS structure for a layered spotlight effect
  • Track mouse position in JavaScript to drive the spotlight
  • Animate a smooth reveal with GreenSock and a clip-path mask