Over on the MediaTemple blog, I show you how you can make a pretty decent little carousel with just a few lines of code. Here’s the entire premise:
Every time a carousel is mentioned in a blog post, itâs a requirement to mention that⦠say it with me now:
You probably shouldnât use a carousel.
Jared Smith made a microsite just for it, with research and rhetoric supporting the idea that you shouldnât use them. Most of that information focuses on the fact that there is low engagement with the non-first-slide(s).
Iâm not here to argue with data, but I would argue with the dogmatism of ânever user them, EVER.â Swiping on mobile is an extremely common action, and what is a swipe that reveals more content? Basically a carousel. What about a carousel that doesnât demand much interaction? Perhaps just a way to swipe through an artistâs recent work. This seems like a perfectly nice way to do that, so long as the UI is clear and accessibility is implemented.
What I am here to talk about is the situation where you do want a carousel and to resist the temptation to reach for a wheelbarrow full of code to do so. I guarantee there are people whoâve picked an entire CMS because they thought they needed it to make a carousel. No shame. Weâre all learning.
I have good news: Carousels donât have to be complicated. They donât have to require a ton of code or do anything that you canât wrap your head around with basic HTML, CSS, and JavaScript knowledge.
It’s not just my idea, I link out to all the smart people who have tackled this subject before throughout the years and made similarly simple and awesome demos.