Skip to the content

Button 07

Shards of colour fly out of the exact rim point the pointer struck, away from the button, and a glow rings the edge for the hover; on the way out fewer shards fly from the exit point, and a press bursts a ring.

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 colour of the effect. On a button of your own, keep your class and add the attribute. Sparks fly past the button, so keep overflow: hidden off the box right around it.
  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="sparks" Shards of colour fly out of the rim point the pointer struck, a glow holds for the hover, and a press bursts a ring.
    This file plays sparks. 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, sparks 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 sparks and of the glow. Options: any CSS colour.
    data-button-motion-duration 0.6 Length of the glow coming up, as six tenths of it, and of its fade, as half of it; the sparks fly at their own pace.
    data-button-motion-press 0.96 The scale of the button while it is pressed.
    data-button-motion-sparks 12 How many sparks fly at each entry; the leave throws six tenths of it and a press one and a half times.

What it does

Button 07 (Sparks) is a button hover animation for Webflow and vanilla JavaScript, built on GSAP 3. Also called spark button hover effect or particle button hover.

Shards of colour fly out of the exact rim point the pointer struck, away from the button, and a glow rings the edge for the hover; on the way out fewer shards fly from the exit point, and a press bursts a ring. Played with GSAP on the button the page already has: the engine sets no font, size, border or background, only the colour of the effect, and puts the label back exactly on destroy. Keyboard focus, touch and reduced motion are handled. Button 07 of the Button set: another button of the set pasted on the same page shares its base. Pattern type particle burst button, confetti, glow, cta hover.

Updated