Skip to content

Multi-Item Card Carousel

Dark Bootstrap 6 card carousel that shows one to four course cards per view, with arrows that stop at the ends, a live range counter and a scroll track.

Also known as: multi item carousel, card slider, multiple cards carousel, responsive card carousel

Bootstrap 6 Carousels Responsive Dark #card #carousel #dark #responsive #slider

Multi-Item Card Carousel live demo

Open in new tab

Bootstrap 6 code (HTML, CSS, JS)

A dark Bootstrap 6 carousel that shows several cards at once: one on phones, two from 576px, three from 1024px and four from 1280px. The demo lists online course cards with gradient covers, level badges, lesson counts, ratings and prices. The same pattern works for blog posts, products, team members or case studies.

How it works

.mic-carousel is a Bootstrap 6 .carousel. Bootstrap 6 builds carousels on CSS scroll-snap, so the number of visible slides is pure CSS: the snippet sets --bs-carousel-items and --bs-carousel-items-gap on .mic-carousel and changes them in media queries. No JavaScript is needed for the responsive layout.

Each .carousel-item holds a Bootstrap 6 card with the hover-lift utility. The .mic-cover header uses one of eight gradient classes (.mic-cover--1 to .mic-cover--8) with a Bootstrap Icon, and the title link uses stretched-link, so the whole card is clickable.

The header with the arrows sits inside the .carousel element, and data-bs-ends="stop" makes Bootstrap disable Previous on the first card and Next once the last card is in view. The script imports Carousel and creates the instance on load so this end state is correct immediately. It then listens to the scroll event of .carousel-inner, reads --bs-carousel-items back with getComputedStyle() and writes "Showing 1–3 of 8" into .mic-range. It also moves the lime bar in .mic-track through the --mic-start and --mic-size custom properties.

Customization

  • --bs-carousel-items on .mic-carousel in each media query: change how many cards fit per view, for example 5 from 1536px.
  • --bs-carousel-items-gap on .mic-carousel: widens or narrows the space between cards.
  • Add --bs-carousel-items-peek: 2rem to .mic-carousel to show a slice of the next and previous card.
  • --mic-accent on .mic-root: recolors the Next button, the "Free" price, the eyebrow and the scroll track. It also feeds --bs-primary-bg.
  • --mic-surface, --mic-bg and --mic-line on .mic-root: set the card, page and divider colors.
  • .mic-cover--1 to .mic-cover--8: edit the linear-gradient() values, or replace the cover with an <img> for photo cards.
  • Change data-bs-ends="stop" to "wrap" so Next jumps back to the first card at the end.

Use cases

  • Online course catalogs: browse course cards with level badges, lesson counts and prices, one to four per view
  • Blog and news sites: scroll through related posts as cards with a live showing-range counter
  • Ecommerce stores: present featured products in a row that adapts from one card on phones to four on desktop
  • Agency case studies: let visitors move through projects with arrows that stop at the first and last card

Accessibility

The carousel is a region labelled by the section heading with aria-roledescription="carousel", and every card is a labelled slide group. .carousel-inner is focusable, so the Left and Right arrow keys move one card at a time. Arrow buttons have hidden text labels and use the native disabled attribute at the ends. The range counter is a polite live region. Keyboard focus on a card title lifts the card and outlines it, mirroring the hover effect. Track movement is disabled under prefers-reduced-motion.

Bootstrap 6 notes

Bootstrap 5 needed custom JavaScript or extra markup to show several items per slide. In Bootstrap 6, --bs-carousel-items does it with CSS. .carousel-control-prev is replaced by plain buttons using .carousel-icon-prev, btn-outline-secondary becomes btn-outline theme-secondary, and badges use badge badge-subtle theme-*. Built on 6.0.0-alpha.1, so details may still change. Icons come from Bootstrap Icons.

Multi-Item Card Carousel at a glance

Framework
Bootstrap 6
Code
HTML, CSS, JavaScript
JavaScript
Vanilla JavaScript, no jQuery
Dependencies
Bootstrap 6, Bootstrap Icons
Layout
Responsive, works on mobile, dark design
Category
Carousels
License
Free for personal and commercial use

Questions about this template

Can I use the Multi-Item Card Carousel code for free?

Yes. You can copy or download the code and use it in personal and commercial projects, including client work. No sign-up is needed. Reselling it as part of a component library or template collection is not allowed; see the license.

How do I add it to my website?

Load Bootstrap 6 and Bootstrap Icons from a CDN (the links are under Requirements). Paste the HTML where the component should appear, add the CSS to your stylesheet and load the JavaScript before the closing </body> tag. Download HTML gives you a complete page with everything already linked.

Does it need jQuery or a JavaScript framework?

No. The script is plain vanilla JavaScript, so it works without jQuery, React or Vue. You can still use the markup inside those frameworks.

Does it work on mobile?

Yes. The layout adapts to small screens. Use the Mobile and Tablet buttons above the live demo to check it at phone and tablet width.

Requirements

Add these to your page (already included in the download):

  • <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@6.0.0-alpha.1/dist/css/bootstrap.min.css">
  • <script type="module" src="https://cdn.jsdelivr.net/npm/bootstrap@6.0.0-alpha.1/dist/js/bootstrap.bundle.min.js"></script>
  • <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">

Built for Bootstrap 6.0.0-alpha.1. Bootstrap 6 ships as an ES module, so its script and this component's JavaScript load with type="module". Alpha releases can still change before the stable version.

Multi-Item Card Carousel – free Bootstrap 6 carousel template
Multi-Item Card Carousel · free Bootstrap 6 carousel template

More Carousels

3D Coverflow Image Carousel – free Pure CSS carousel template

3D Coverflow Image Carousel

Coverflow-style image carousel with rotated 3D side photos, reflections, captions, dots, swipe and keyboard navigation in pure CSS and vanilla JS.

Scroll-Snap Carousel – free Pure CSS carousel template

Scroll-Snap Carousel

Native CSS scroll-snap carousel with arrow buttons, synced pill dots and keyboard support, enhanced by a few lines of vanilla JavaScript.

Infinite Auto-Scrolling Image Strip – free Pure CSS carousel template

Infinite Auto-Scrolling Image Strip

Seamless pure CSS marquee of landscape photos that loops forever, pauses on hover or focus and has a Pause/Play button.

Image Carousel with Thumbnails – free Tailwind CSS carousel template

Image Carousel with Thumbnails

Tailwind CSS image carousel with a clickable thumbnail strip, captions, swipe support, arrow-key navigation and optional looping.

Product Carousel with Thumbnails – free Bootstrap 6 carousel template

Product Carousel with Thumbnails

Bootstrap 6 product image carousel with a thumbnail rail, photo counter and arrows, next to a buy box with edition picker, quantity stepper and add to cart.

Testimonial Carousel – free Bootstrap 6 carousel template

Testimonial Carousel

Bootstrap 6 testimonial carousel with crossfading customer quotes, avatars, star ratings, an autoplay progress indicator and a play/pause control.