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.
Important: if what you are looking for is only a justified image carousel, with no videos, then please get this tutorial instead: Elementor Carousel Mods (Vertical, Fade, Justified, Center). The current tutorial is only for when you need either both videos and images, or just videos.
Let's get started!
First, import the template on your page
This is a premium tutorial. Purchase access to unlock the full tutorial.
6 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!
Any chance that the slide (at the center) increase size or all the other slides decrease so users can focus on the main slide?
Hey Trevor!
Try this CSS:
Cheers!
Thanks Max, it works but it's increasing size for the first slide, not the second one (the one at the center). I tried to modify the code but without any success.
Please don't rely on the editor, the CSS will work fine on the front end!
Cheers!