Free Card Carousel Widget for Any Website
A card slider for blog posts, products, team members or reviews that visitors can swipe, click or move with the keyboard. Describe your cards to the AI, then paste two lines of HTML into WordPress, Shopify, Squarespace or Wix.
Card 1 of 6
Example content. Swipe, use the arrows or dots, or focus the cards and press the arrow keys.
Card Carousel, Image Carousel or Grid?
A carousel saves space, but it hides most of its content behind a click or a swipe. Usability studies keep finding that few visitors go past the first couple of slides. So before you build one, check that a carousel is the right shape for your content.
| Card carousel | Image carousel | Grid | |
|---|---|---|---|
| Best for | Items with text, a price or a button as well as a picture | Photos that speak for themselves | A handful of items, or items people compare |
| First thing visitors see | Two or three cards, with the next one peeking in | One large image | Everything at once |
| Items past the first screen | Often missed, so the best card goes first | Often missed | Nothing is hidden |
| On phones | One card and a peek; swipe to move | Full-width image; swipe to move | Stacks into one long column |
| Typical use | Blog posts, products, team, testimonials | Portfolios, banners, galleries | Plans, features, a small team |
Three rules cover most cases:
- Under about four items, use a grid. If everything fits on one row, hiding part of it behind arrows only adds a step.
- Put the best card first. Order cards by how much you want them seen, not by date or alphabet. The first two or three get most of the attention.
- Use pictures alone in an image carousel. If each slide is a photo with no text to read, an image carousel shows it larger and is simpler to use.
How Many Cards to Show on Each Screen
Pick the number of cards per view by screen width, not by how many you have. A card has to be wide enough to read its title on one or two lines. A common setup is:
- Phones: one card, about 80 to 85% of the width.
- Tablets: two cards.
- Desktops: three cards, or four if the cards are small, such as products with a short name.
Let the next card peek in. A slice of the next card at the edge tells visitors there is more to see, often better than the arrows do. The demo above shows a little over two cards for this reason. On a phone, the peek is what makes people try a swipe.
Keep every card the same height, and keep titles to a similar length. Cards of mixed heights make the row look broken and make the arrows jump around.
Autoplay: Usually Leave It Off
Cards carry text. When the row slides on its own, a visitor halfway through a card loses it, and has to find the arrow back. That is why most card carousels work best when they only move when the visitor moves them.
Autoplay can suit a row of short quotes or logos that nobody needs to read closely. If you turn it on:
- Add a visible pause button. WCAG 2.2.2 (Pause, Stop, Hide) requires a way to stop anything that moves for more than five seconds.
- Stop on hover, focus and touch, so the card someone is reading stays put.
- Respect reduced motion. When the visitor's device asks for less motion, don't autoplay at all.
- Go slowly. Give each move at least five to seven seconds.
For a row of brand logos that scrolls without stopping, a logo slider is the better tool.
What an Accessible Card Carousel Needs
Many carousels are a row of divs with click handlers. They look fine and fail anyone using a keyboard or a screen reader. These checks work on any carousel, including the demo at the top of this page:
- Real buttons with labels. The arrows are
<button>elements with labels such as "Next card", not icons alone. The dots are buttons too, with labels such as "Go to card 3". - It says what it is. The wrapper has
aria-roledescription="carousel"and a label, and each card is a group witharia-roledescription="slide"and a label like "2 of 6". - The keyboard works. Tab reaches the arrows and the cards, and the arrow keys move between cards. Nothing traps focus.
- Changes are announced, but not too often. A polite live region reports "Cards 2 to 3 of 6" when the visitor moves. During autoplay it should be silent, or a screen reader talks over itself.
- Motion is optional. Smooth scrolling and slide animations switch off when the device asks for reduced motion.
- Targets are big enough. Arrow buttons around 44 pixels and dots at least 24 pixels, so they are easy to hit on a phone.
When you build a carousel with MightyWidgets, ask for "an accessible card carousel" and check the result against this list.
Prefer to write the carousel yourself?
This is a complete card carousel in plain HTML, CSS and a few lines of JavaScript, free to copy. CSS scroll snap does the hard part: swiping, trackpad scrolling and settling on a card all come from the browser. The script only wires up the arrow buttons, and it works for any number of carousels on a page.
<div class="cc" role="region" aria-roledescription="carousel" aria-label="Latest posts">
<button class="cc-prev" type="button" aria-label="Previous card">‹</button>
<div class="cc-track" tabindex="0">
<div class="cc-card" role="group" aria-roledescription="slide" aria-label="1 of 4">...</div>
<div class="cc-card" role="group" aria-roledescription="slide" aria-label="2 of 4">...</div>
<div class="cc-card" role="group" aria-roledescription="slide" aria-label="3 of 4">...</div>
<div class="cc-card" role="group" aria-roledescription="slide" aria-label="4 of 4">...</div>
</div>
<button class="cc-next" type="button" aria-label="Next card">›</button>
</div>
<style>
.cc { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; }
.cc-track {
display: flex; gap: 16px; min-width: 0;
overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
}
.cc-track::-webkit-scrollbar { display: none; }
/* 1 card plus a peek on phones, 2 on tablets, 3 on desktop */
.cc-card { flex: 0 0 85%; scroll-snap-align: start; }
@media (min-width: 640px) { .cc-card { flex-basis: calc((100% - 16px) / 2.15); } }
@media (min-width: 1024px) { .cc-card { flex-basis: calc((100% - 32px) / 3.15); } }
@media (prefers-reduced-motion: no-preference) { .cc-track { scroll-behavior: smooth; } }
</style>
<script>
document.querySelectorAll('.cc').forEach((cc) => {
const track = cc.querySelector('.cc-track');
const step = () => track.querySelector('.cc-card').offsetWidth + 16;
cc.querySelector('.cc-prev').addEventListener('click', () => track.scrollBy({ left: -step() }));
cc.querySelector('.cc-next').addEventListener('click', () => track.scrollBy({ left: step() }));
});
</script>Replace each ... with your own card markup. What it leaves out is the card design, dots, a live region and editing the cards without touching your site. That is what the builder is for.
Keeping a Card Carousel Fast
Carousels get a reputation for slow pages because many of them load every image and a large slider library up front. A few habits avoid that:
- Lazy-load the images. With
loading="lazy", cards out of view only download their images when they come close. - Size images for the card. A card that displays at 300 pixels wide does not need a 2,000 pixel photo. Give every image a width and height so the row doesn't jump as it loads.
- Skip the slider library. Scroll snap is built into every modern browser, so the carousel needs very little JavaScript.
A MightyWidgets carousel loads through one small loader script after your page, shared by every widget on it. It renders inside a Shadow DOM, so your theme's CSS can't stretch the cards or restyle the buttons, and the carousel's CSS can't touch the rest of your page.
Add the Carousel to WordPress, Shopify, Squarespace or Wix
When you publish your carousel, MightyWidgets gives you this snippet with your widget's ID filled in:
<script src="https://cdn.mightywidgets.com/load.js" async></script>
<div data-mightywidgets-id="YOUR_WIDGET_ID"></div>WordPress
Add a Custom HTML block where the carousel should sit and paste the snippet. It works the same inside Elementor or Divi with their HTML or Code module.
Shopify
In the theme editor, add a Custom Liquid section to the home page or a product template and paste the snippet.
Squarespace
Add a Code block and paste the snippet. Squarespace only runs scripts in Code blocks on its Core plan and above.
Wix
Add an Embed HTML element (Add, then Embed Code), paste the snippet, then drag the box to the height of your cards.
Webflow, Ghost and plain HTML pages work the same way. Give the carousel a full-width section; a narrow sidebar leaves room for one card at most.
Prompts to Start From
Say what goes on each card, how many show at once and how it should look. Then paste in your real content, or ask the AI to fill in placeholders you can edit.
- Blog: "A card carousel of my six latest posts. Each card has an image, a category tag, the title and the read time, and links to the post. Three cards on desktop, one on phones, with the next card peeking in."
- Shop: "Product cards with a photo, name, price and a Shop now button linking to each product. Four per view on desktop. Lazy-load the images."
- Team: "Our team as cards with a round photo, name, role and one sentence each. Arrow buttons and dots, no autoplay."
- Reviews: "Customer quotes as cards with five stars, the quote and the customer's first name. Autoplay every 7 seconds with a pause button, and stop on hover."
Card Carousel Questions
Is the card carousel widget free?
Yes, to start. The Free plan includes 50 credits for building and editing with AI, and your widget's first 100 loads each month are free. After that each load uses one credit; if you run out, the carousel keeps working with a small "Powered by MightyWidgets" tag.
What is the difference between a card carousel and an image carousel?
An image carousel shows one picture at a time, usually full width. A card carousel shows several cards side by side, and each card holds a small set of content: an image, a title, a line of text, a price or a button. Use cards when visitors need to read something before they click.
How many cards should a carousel have?
Most work best with five to ten. Fewer than about four fit in a plain row or grid, with no hidden content. More than about twelve gets tiring to click through; split them into two carousels by topic, or link to a full page.
Can visitors swipe through the cards on a phone?
Yes. Ask for a scroll-snap carousel like the demo on this page and the cards move with a normal swipe on phones and a two-finger swipe on trackpads, then settle neatly on a card. The arrow buttons and dots still work for mouse and keyboard users.
Will a card carousel slow down my page?
It should not if the images are sized and lazy-loaded, so only the cards in view download at first. Ask the AI for lazy-loaded images, and upload images close to the size they display at. The widget loads with a small script after your page, so it does not hold up your own content.
Can I have more than one carousel on a page?
Yes. Each carousel is its own widget with its own ID, so paste one snippet line per carousel (the script line only needs to be on the page once). You can also embed the same carousel on as many pages as you like. Every embed counts as a load.
Can the carousel pull cards from my blog, store or a spreadsheet?
No. MightyWidgets does not connect to RSS feeds, product catalogs, CMS collections or Google Sheets. You type the cards in your prompt, or paste the text and image links and ask the AI to build them. To add or change a card later, edit the widget in your dashboard and publish.
Should the carousel play automatically?
Usually not. Cards have text, and a carousel that moves while someone is reading is annoying and hard to use. If you do want autoplay, ask for a visible pause button and for it to stop when a visitor hovers over it, focuses it or touches it.
Is this source code I can copy into my site?
The widget itself is hosted: you paste a two-line snippet, and MightyWidgets serves the carousel. If you would rather own the code, this page has a free HTML, CSS and JavaScript carousel you can copy and style yourself.
Will my theme's CSS break the carousel?
No. The widget renders inside a Shadow DOM, so your theme's styles do not leak into the cards and the carousel's styles do not leak into your page. Tell the AI your fonts and colours so it matches your site.
Can I change the cards after the carousel is live?
Yes. Edit the widget in your dashboard (or ask the AI for the change) and publish. Every page that embeds it updates, and the snippet stays the same.


