Skip to main content

"Before & After" Slider interaction

Learn how to create a draggable slider with a quick parametric animation

I
Written by Inbal Shemesh
Updated over 2 months ago

This effect is built using a parametric animation, triggered by horizontal mouse movement.


Setup Instructions

1. Select the frame

  • Choose the frame named slider frame — it contains the two image halves (colored + black & white)

2. Add the parametric animation

  • In the Interact panel, create a new Parametric Animation

  • Set the action to Horizontal Mouse Move


Interaction Settings

  • Click the Customize button next to Mouse Move X

    • Turn ON Smooth Animation

    • Turn ON On Click

    • Turn ON From current position
      → This allows the interaction to start from wherever the mouse currently is

  • Area of Action: keep as slider frame

  • By name: Turn OFF

  • Layer of Interaction: choose left plus slider — this is the layer that will expand/shrink on drag


Animation Properties

  • Choose: Width only

  • Turn ON both Start from and Change to

Set values:

  • Start from = 5%

  • Change to = 95%

  • Leave Min/Max Width as default

  • Duration = 4s

  • Ease = linear → for smooth real-time drag without delay


Important Note on Image Setup

To make the effect seamless:

  • In both left and right frames, place the same image,

  • In the same position and same size

This creates the illusion of a single image being gradually revealed.

Did this answer your question?