Webflow maintenance

How do I animate an element on click in Webflow?

Add a Webflow Mouse click trigger in Classic Interactions, set the 1st click action, and publish before you test the live button.

THE SHORT ANSWER

In Classic Interactions, select the element, click the plus icon next to Element trigger, and choose Mouse click (tap). For the 1st click, pick a pre-built Appear and disappear or Emphasis animation, or start a custom timed animation. The 2nd click can use a different action. The clicked element can trigger a different element. This panel is not the GSAP builder. Publish and test the live page.

Use Classic Interactions for a click

Webflow documents Mouse click (tap) inside Classic Interactions. The same help article says Webflow Interactions with GSAP is a separate way to build animations. This guide follows the Classic Interactions panel only. If you do not see Element trigger and Page trigger, these names will not match. Do not force this sequence onto the GSAP builder.

A click is an element trigger. It runs because someone clicks or taps an element. Scroll into view runs when an element enters the screen. Page load runs when the page starts loading. The scroll guide and the page load guide are those two triggers. This page is the click.

Select the element that should receive the click. A button labeled Show details is a clear trigger. Give it a class before you build the animation if later clicks on similar buttons should share it. A class-based action needs that class on the element first. Webflow will not offer the class option for an element that has none.

Add the Mouse click (tap) trigger

Select the button. Open the Interactions panel. Click the plus icon to the right of Element trigger, then choose Mouse click (tap). You can hover the option in that list if you want the short description before you select it.

By default, the interaction runs on that selected button, and it runs on every breakpoint: desktop and above, tablet, phone landscape, and phone portrait. To limit the devices, check only the breakpoints that should run it, in the trigger settings. A motion that suits a mouse can be the wrong choice on a small phone. Turn those breakpoints off rather than hiding the button.

To use the same trigger on every element with that class, set the animation on one of them. Open Trigger settings, select Class, and choose the class from the dropdown. A click on any element with that class can then start the interaction.

The button does not have to be the element that moves. Webflow's own example is a button that, when clicked, makes an image spin. The trigger and the target can be different elements. Show details can be the trigger, and a note under it can be the target.

Set the first click, then decide on the second

After you choose Mouse click (tap), set what happens on the 1st click. Set the 2nd click only when the second tap should do something else.

Pre-built animations are available on element triggers, including this click. They are not available on page triggers. Open the Action dropdown for the 1st click and choose an action under Appear and disappear, or under Emphasis. Webflow names fade, shrink, and jello as examples of pre-built animations. On an Appear and disappear animation you can set a direction and a delay. On an Emphasis animation you can set a direction.

Example: Show details should fade when it is clicked. On the 1st click, choose a fade from Appear and disappear. Leave the 2nd click unset until the first click already does what you want. Add a 2nd click action when the second tap should change the motion. You can also set a delay so the animation waits before it starts. Leave the delay alone until the click itself is reliable.

Build a custom animation when the preset is not enough

Open the Action dropdown for the 1st click. Click Start an animation under Custom animation. Click the plus icon next to Timed animations, and name the animation in the top field. Show details fade is a clear name. Click the plus icon to the right of Actions, and choose an action under Transform, Style, or Miscellaneous.

By default, the action affects the element that was selected when you created it. To aim it at the note instead of the button, right-click the action in the timeline and click Change target, then select the note on the canvas. A change in that timeline affects every interaction that uses the same animation sequence. If the homepage button and the contact button share one animation, edit it once and check both pages.

If one click should affect several elements that share a class, target the class. If only a note inside this group should move, limit that class to children, siblings, or parents of the trigger. Webflow puts that limit in the Affect menu. Only children with this class is the choice when hovering or clicking one button would otherwise animate every matching note on the page.

Publish, then click the live button

Save the interaction and publish the site. Open the live page and click Show details. A trigger that exists only in the Designer is not on the live page yet. Click it on a phone as well if that breakpoint is still checked.

If one page moves and another page with the same button does not, use the interactions after publish guide. This page is how to add the click. That guide is what to check when the live site does not match the Designer.

A click animation on a button you already have is ordinary interaction work. The membership is one plan for every existing Webflow site: $999 per month, including 10 hours of Webflow work. Additional work is $75 per hour and starts only after you approve a written estimate.

Questions & answers

The motion I want plays when the block scrolls into view. Is Mouse click right?

No. Mouse click (tap) runs when someone clicks or taps. Scroll into view runs when the element enters the screen. Use the scroll guide for that trigger.

I do not see Element trigger. Where is Mouse click?

This guide is Classic Interactions. If the panel is the GSAP builder, these control names will not match. Do not force this sequence onto that builder.

The button fades and the note stays still. What is the target?

The action still targets the button. Right-click the action, choose Change target, and select the note. The button can be the trigger while another element moves.

Can the second tap do something different from the first?

Yes. Mouse click (tap) has a 1st click action and a 2nd click action. Set the second only when that tap should differ.

Sources & further reading

Need a hand with your Webflow site?

View membership