Search code examples
cssframeworksmaterialize

How can I put the prev and next arrow in materialize carousel?


I have the second carousel that moves with the click and drag... but I want to show the arrows to let the user know that is a slider ... is there a way to show it with materialize ? or do I have to make it from another way ?


Solution

  •   <div class="carousel carousel-slider center" data-indicators="true">
        <div class="carousel-fixed-item center">
          <a class="btn waves-effect white grey-text darken-text-2">button</a>
        </div>
        <div class="carousel-item red white-text" href="#one!">
          <h2>First Panel</h2>
          <p class="white-text">This is your first panel</p>
        </div>
        <div class="carousel-item amber white-text" href="#two!">
          <h2>Second Panel</h2>
          <p class="white-text">This is your second panel</p>
        </div>
        <div class="carousel-item green white-text" href="#three!">
          <h2>Third Panel</h2>
          <p class="white-text">This is your third panel</p>
        </div>
        <div class="carousel-item blue white-text" href="#four!">
          <h2>Fourth Panel</h2>
          <p class="white-text">This is your fourth panel</p>
        </div>
      </div>
    

    Javascript

      $('.carousel.carousel-slider').carousel({fullWidth: true});
    

    So something like this ?

    source: http://materializecss.com/carousel.html

    With button < > : https://codepen.io/Paco_Cervantes/pen/ZLxKpj?q=materialize+carousel&limit=all&type=type-pens

    if you need a specific word previous or edit let me know