Slideshow
Bootstrap 5 Slideshow component
Responsive Slideshow built with Bootstrap 5. Examples of adding controls, slideshow buttons: square and rounded, dark variant, automatic slide and more.
Basic example
Here’s a slideshow with slides only. Note the presence of the .d-block
and
.w-100
on carousel images to
prevent browser default image alignment.
Adding Controls
You can add the previous and next controls:
With text
Add captions to your slides easily with the .carousel-caption
element within any
.carousel-item
. They can be easily hidden on smaller viewports, as shown below, with
optional display utilities. We
hide them initially with .d-none
and bring them back on medium-sized devices with
.d-md-block
.
Dark variant
Add .carousel-dark
to the .carousel
for darker controls, indicators, and
captions. You'll find more information about dark mode here.
Automatic slide
You can change the length of delay between items by setting
data-mdb-interval=""
. Add this option to the class .carousel-item
.
Manual slide
If you don't want an automatic slide, you have to set data-mdb-interval="false"
.
Without loop
To stop cycling at the end of a slideshow, you have to add data-mdb-wrap="false"
to the
main
div
.
Product Cards
Here’s an example slideshow with product cards which have star ratings.
Full page
An example of full-page usage of the slideshow with text overlay.
Click on the image to see a live demo.