GSAP Button On Hover Interaction

An attributes-only solution to add a fancy button on-hover interaction.

How it works

  1. step #1

    Copy the GSAP Button On Hover style and <script> and paste them into the <head> of your page

    <!-- [Webflow Friendly Components by Francesco Castronuovo] GSAP Trail Image Effect -->
    <script async src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.12.2/gsap.min.js"></script>
    <link href="https://cdn.jsdelivr.net/gh/francesco-castronuovo/gsap-button-on-hover@1.0.3/style.css" rel="stylesheet" type="text/css">
    <script async src="https://cdn.jsdelivr.net/gh/francesco-castronuovo/gsap-button-on-hover@1.0.3/main.js"></script>
    Copy Script
  2. step #2

    Implement in Webflow

    Apply the attributes to the elements inside the page

    Below is a list of elements and options to create the GSAP button on-hover interaction.

    target
    I want this
    Section
    Container
    or
    Div Block
    to be the area where the custom corsor will be shown.
    button
    I want this
    Button, Link Block or Text Link
    to be the button the hover interaction will be applied to.
    cursor
    I want this
    Div Block
    to be the custom cursor inside the "target".
    follower
    I want this
    Div Block
    to be the wrapper of the "cursor".
    Option
    follower move duration
    I want to set the time it takes for the follower to cach up with the cursor.
    Option
    follower move easing
    I want this easing function to be applied to the movement of the follower.
    Option
    hover duration
    I want to set the duration of the hover animation.
    Option
    hover easing
    I want this easing function to be applied to the hover animation.
    Option
    opacity duration
    I want to set the duration of the fade animations applied to the cursor or follower.
    Option
    opacity easing
    I want this easing function to be applied to the fade animations.