Danny Madanes free asked 6 years ago

What is the best way to implement a modal carousel in bootstrap v4.0.0-beta

Onest Paul free answered 3 years ago

It really Helps me Thanks alot

Mirosław Stasiak free answered 6 years ago


Just write a carousel in the model
Have you ever tried to do it by yourself?
Check example:

<div class="modal fade" id="basicExample" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
 <div class="modal-dialog" role="document">
  <div class="modal-content">
   <div id="carousel-example-1z" class="carousel slide carousel-fade" data-ride="carousel">
    <ol class="carousel-indicators">
     <li data-target="#carousel-example-1z" data-slide-to="0" class="active"></li>
     <li data-target="#carousel-example-1z" data-slide-to="1"></li>
     <li data-target="#carousel-example-1z" data-slide-to="2"></li>
    <div class="carousel-inner" role="listbox">
     <div class="carousel-item active">
      <img class="d-block w-100" src="https://mdbootstrap.com/img/Photos/Slides/img%20(130).jpg" alt="First slide">
     <div class="carousel-item">
      <img class="d-block w-100" src="https://mdbootstrap.com/img/Photos/Slides/img%20(129).jpg" alt="Second slide">
     <div class="carousel-item">
      <img class="d-block w-100" src="https://mdbootstrap.com/img/Photos/Slides/img%20(70).jpg" alt="Third slide">
    <a class="carousel-control-prev" href="#carousel-example-1z" role="button" data-slide="prev">
     <span class="carousel-control-prev-icon" aria-hidden="true"></span>
     <span class="sr-only">Previous</span>
    <a class="carousel-control-next" href="#carousel-example-1z" role="button" data-slide="next">
     <span class="carousel-control-next-icon" aria-hidden="true"></span>
     <span class="sr-only">Next</span>

<button type="button" class="btn btn-primary btn-lg" data-toggle="modal" data-target="#basicExample">
 Launch demo modal

Gábor Kovácsházi free commented 3 years ago

Unfortunately this solution does not work

Krzysztof Wilk staff commented 3 years ago


Try this one https://mdbootstrap.com/snippets/jquery/krzysztof-wilk/2792779

Best regards

Please insert min. 20 characters.


Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.



Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: General Bootstrap questions
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: No
  • Provided link: No