Skip to the content

Button 02

A circle of colour floods the button from the point the pointer came in, the label turning to the ink colour exactly where the circle passes under it, and drains toward the point the pointer left.

Become a member to unlock the full effect today.

Join now

Already a member? Sign in

Documentation

  1. Copy to Webflow

    Add Geist and Geist Mono to your site's fonts (Site settings, Fonts, Google Fonts) before pasting: Webflow removes any font your site has not installed.

  2. Add custom CSS

    The look of the preview is the button-set-* classes of the paste: the button at rest, its row and the words around it. The Embed only places the moving layers and holds the two colours of the effect. On a button of your own, keep your class and add the attribute.
  3. Add custom JS

  4. Use it on your own elements

    Custom attribute
    Select the element on the canvas and open the Settings panel. Under Custom attributes, add a pair: the name on the left, the value on the right.
    Custom attributeWhat it does
    data-button-motion="fill" A circle of colour floods the button from the point the pointer came in, and drains toward the point it left.
    This file plays fill. Another animation of the set needs that button's own code on the page: without it, the button stays as the page styled it and the browser console says so. An empty or unknown value plays fill when fill's code is on the page, fill otherwise, and says so in the console.
    Settings
    Every setting is a custom attribute too, added the same way and on the same element. An attribute always wins over the defaults written in the code.
    AttributeDefaultWhat it is
    data-button-motion-color #ffab1a The colour of the flood. Options: any CSS colour.
    data-button-motion-ink auto The colour of the label once the flood is under it. auto, the default, picks #15100c or #f4ece0, whichever has the higher contrast on color, so a pale colour gets the dark label and a dark or saturated one the light label; the default ink #15100c gets #f4ece0. Options: auto, or any CSS colour, kept as it is, so one that reads on color.
    data-button-motion-duration 0.6 Length of the flood, in seconds; the drain takes eight tenths of it.
    data-button-motion-press 0.96 The scale of the button while it is pressed.

What it does

Button 02 (Fill) is a button hover animation for Webflow and vanilla JavaScript, built on GSAP 3. Also called directional fill button hover, button fill on hover or fill button hover effect.

A circle of colour floods the button from the point the pointer came in, the label turning to the ink colour exactly where the circle passes under it, and drains toward the point the pointer left. Played with GSAP on the button the page already has: the engine sets no font, size, border or background, only the two colours of the effect, and puts the label back exactly on destroy. Keyboard focus, touch and reduced motion are handled. Button 02 of the Button set: another button of the set pasted on the same page shares its base. Pattern type liquid fill button, ripple fill, cta hover.

Updated