In this tutorial I will show you how to create an Elementor justified videos and image carousel.
For this justified media carousel, we will be using the new Carousel element from Elementor.
All the images and videos have the same height, and their width varies.
Importantly, there is no cropping going on here. The entire images or videos are shown.
Here is a live example of what we will be creating.
You can also visit the demo page directly.
Features:
- Justified: The only justified video and image carousel solution for Elementor! Everything has the same height, and the width varies depending on the native aspect ratio of the image or video
- Responsive: Set different a carousel height for different viewports
- Flexible: We are using the native Image and Video elements for the images and videos, so you have all the control you would normally have with them (such as setting the videos to autoplay, muted, show the video controls or not, etc).
Limitations:
- Does not work well with YouTube and Vimeo videos: As these videos are embedded through an iFrame, you can't swipe over them to change slide. You have to use the arrows to navigate. You also can't set the carousel to loop if using YouTube or Vimeo videos.
- Won't autoplay reliably: not a limitation of this tutorial in particular, but rather of all <video> elements. Some browsers and OS, like iOS in particular, can just decide to prevent autoplay, and there is little we can do about it. Learn more in my Video Autoplay not Working on Mobile article.
As this works much better with self hosted videos, you will want to have a look at the Self Hosting your Videos tutorial.
The tutorial is written for self hosted videos.
Let's get started!
First, import the template on your page
This is a premium tutorial. Purchase access to unlock the full tutorial.
2 Responses
Is there any code i can use to make this infinite scroll smoothly on its own and then pause on hover? 🙂 Thanks for the great tutorial as always
Greetings Alistair!
I found that with videos, and with justified (varying width items), it just doesn't work well... however if you wish to try by yourself, here is how:
Under Carousel > Content > Settings, set the Scroll Speed to 0, and the Transition Duration to 5000 . Enabled Pause On Hover.
Again though, I don't recommend it. It won't stop on hover until the transition is completed... the UX isn't great.
Cheers!