Animating in Frames: Repeating Image Transition

A playful exploration of animating repeated image frames along a path, inspired by Joana Correia’s motion design reel.

In our last Motion Highlights collection, I added a really amazing reel by Joana Correia, a truly skilled motion designer. Her works are so thoughtful and browsing her latest projects I stumbled upon one of her other reels wrapping up her last year. Right at the beginning, there is this:

View the full reel.

This small excerpt showcases a really interesting sliced repetition effect, which inspired me to try something new: animating “frames” of the same image along a path. I’m not sure if this is any good, but for some reason, I really like it. It feels like it could fit well within editorial design contexts.

It’s just a proof of concept, but I hope it sparks some new ideas for you too! πŸ™‚

Configuration

There are better ways to do this obviously, but since this is a proof of concept and we want to be able to show various effects in our demo, I decided to do it like this. So here’s how the configuration works.

Each grid item can override the global animation settings by specifying data- attributes directly in the HTML. This allows fine-tuning of transitions on a per-item basis.

You can customize the following options for each .grid__item:

  • clipPathDirection β€” data-clip-path-direction: Direction for clip-path animation (top-bottom, bottom-top, left-right, right-left).
  • steps β€” data-steps: Number of mover elements created between grid item and panel.
  • stepDuration β€” data-step-duration: Duration (in seconds) of each mover animation step.
  • stepInterval β€” data-step-interval: Delay (in seconds) between each mover’s animation start.
  • rotationRange β€” data-rotation-range: Maximum random rotation (Β±value, degrees) applied to movers.
  • wobbleStrength β€” data-wobble-strength: Maximum random positional wobble (in pixels) during motion path generation.
  • moverPauseBeforeExit β€” data-mover-pause-before-exit: Pause duration (in seconds) before movers exit.
  • panelRevealEase β€” data-panel-reveal-ease: Easing function used when revealing the panel.
  • gridItemEase β€” data-grid-item-ease: Easing function for animating grid item exits.
  • moverEnterEase β€” data-mover-enter-ease: Easing function for movers entering.
  • moverExitEase β€” data-mover-exit-ease: Easing function for movers exiting.
  • panelRevealDurationFactor β€” data-panel-reveal-duration-factor: Multiplier to adjust panel reveal animation timing.
  • clickedItemDurationFactor β€” data-clicked-item-duration-factor: Multiplier to adjust clicked grid item animation timing.
  • gridItemStaggerFactor β€” data-grid-item-stagger-factor: Multiplier for staggered grid item animations (based on distance).
  • moverBlendMode β€” data-mover-blend-mode: CSS mix-blend-mode to apply to movers (normal, screen, etc.).
  • pathMotion β€” data-path-motion: Path motion type: linear (straight) or sine (curved).
  • sineAmplitude β€” data-sine-amplitude: Height of sine wave if using sine path motion (in pixels).
  • sineFrequency β€” data-sine-frequency: Frequency of sine wave motion (higher = more waves).

Example

<figure class="grid__item"
        data-clip-path-direction="left-right"
        data-steps="8"
        data-rotation-range="20"
        data-path-motion="sine"
        data-sine-amplitude="60"
        data-sine-frequency="6.28">

  <div class="grid__item-image" style="background-image: url(assets/img32.webp)"></div>
  
  <figcaption class="grid__item-caption">
    <h3>Aura β€” K21</h3>
    <p>Model: Lily Cooper</p>
  </figcaption>
  
</figure>

This item will fly with 8 movers, stronger rotation wobble, a sine wave path, and panel opening from left to right.

Try it out and play with it and I really hope you enjoy it!

Manoela Ilic

Editor-in-Chief at Codrops. Designer, developer, and dreamer β€” sharing web inspiration with millions since 2009. Bringing together 20+ years of code, creativity, and community.

The
New
Collective

πŸŽ¨βœ¨πŸ’» Stay ahead of the curve with handpicked, high-quality frontend development and design news, picked freshly every single day. No fluff, no fillerβ€”just the most relevant insights, inspiring reads, and updates to keep you in the know.

Prefer a weekly digest in your inbox? No problem, we got you covered. Just subscribe here.