Animated SVG Frame Slideshow

An experimental slideshow that shows an animated SVG frame when transitioning between slides. Different shapes can be used for creating a variety of styles.

From our sponsor: Elevate all your marketing with Mailchimp Smarts.

Today we’d like to share an experimental slideshow with you. The idea is to animate an SVG frame while we transition from one slide to another. Using different shapes we can create a variety of frame styles when morphing the SVG path. The inspiration for this idea is based on the Dribbble shot MEDIOCRE: 06 by Shota. We are using anime.js for the animations.

This demo is kindly sponsored by Sencha: Create data-intensive, feature-rich web and mobile apps with Sencha Ext JS.

If you would like to become a demo sponsor, you can find out more here.

Attention: For the demo we use some modern CSS properties like CSS Flexbox and CSS variables, so please view them in a up-to-date browser.

Have a look at some screenshots:

Here we are animating a simple box-like shape:

In this demo we used a pattern for the fill of the shape which is a slightly skewed rectangle. The pattern is from Hero Patterns:

Here we animate a circular shape to make it look like we are “focussing” on a specific place in the map. The map is added to the same SVG:

In this demo, we make a step-wise animation, making each corner move with a delay:

This example shows that we can use any kind of shape, even a very small one. Note how we placed the titles on top of the SVG in this demo:

We hope you enjoy this demo and find it useful!

References and Credits

Tagged with:

Mary Lou

ML is a freelance web designer and developer with a passion for interaction design. She studied Cognitive Science and Computational Logic and has a weakness for the smell of freshly ground peppercorns.

Stay up to date with the latest web design and development news and relevant updates from Codrops.

CSS Reference

Learn about all important CSS properties from the basics with our extensive and easy-to-read CSS Reference.

It doesn't matter if you are a beginner or intermediate, start learning CSS now.

Feedback 37

Comments are closed.
  1. Manoela: This is so cool. I made demo5 work. I have one question though. The images you use have very small footprint, but they do not lose crispiness. How do you do that? – P

  2. All of the SVG frames are pretty cool. I have bookmarked this page for next to read. Could you please make it something that can retrieve images from videos?

  3. The project is really awesome and quite useful nowadays. Another Great learning 🙂

  4. Hi Mary Lou, this is an awesome use of SVG, Thanks for sharing.
    In demo 5 you use the d=”” attribute with no commands apart from M and Z.. Im a bit confused as I didn’t know you could do that and I can’t find any references online as a quick search and all examples come with commands in the d=”” attribute.. Could you please give a clue of where to look to learn how to use it in that way, please

  5. Hello and thx you for this amazing job.
    One question : is that possible on third demo to make a different path color of the svg(class=shape) for each side ?

  6. Hi Mary Lou, this is an awesome, thanks for sharing.
    I am beginner, sorry for stupid question, but…

    Where and what to change in code if I want the slideshow to go automatically?
    Thank you very much.

  7. Hi Mary Lou, thanks for sharing.
    One question I am beginner. Where in code and in which can I change something so that the slideshow drops automatically all over? Well thank you. WITHOUT LOVE Joseph

  8. It’s Awesome. I generally don’t comment on any tutorial or work like that, but this time, I can’t stop myself commenting. Great Work !!!

    • The div class=”slide__img” style=”background-image: url(img/25.jpg)” doesn’t show!

    • Puxa a imagem com a tag de tema do wordpress . Dê uma olhada no console para saber quais os erros, provável que algo não está carregando de acordo.

  9. Can anybody explain what the demo.js file does and why the page won’t load/work when it’s removed? It seems related to the navigation menu, so I don’t understand why it’s required for this to work??