26

Are there any options to stop slick adding next & previous buttons? I can't seem to hide them via css.

<button type="button" data-role="none" class="slick-prev" aria-label="previous" style="display: inline-block;">Previous</button>
Beofett
  • 2,309
  • 1
  • 23
  • 36
v3nt
  • 2,638
  • 6
  • 32
  • 49

7 Answers7

69

Add prevArrow: false and nextArrow: false to where you call your carousel. Ex)

$('.slider').slick({
    dots: false,
    prevArrow: false,
    nextArrow: false
});

I added dots: false in case you wanted to remove that too.

Remco Beugels
  • 1,075
  • 1
  • 11
  • 21
Edward
  • 1,100
  • 9
  • 20
  • With lazyLoad setted to "ondemand" this solution prevents image to be displayed when the carousel is dragged. The solution that worked for me is the one repoterd by @Zoltan Ordog – Stefano Martella Aug 28 '20 at 08:50
22

if you want to get rid of both arrows:

$('.slider').slick({
   arrows: false
});
Zoltan Ordog
  • 340
  • 2
  • 5
4

Do you want to hide the buttons? Then try this CSS:

.slick-prev:before,
.slick-next:before {
   display:none;
}
atiquratik
  • 1,154
  • 3
  • 22
  • 30
3
$('.slider').slick({
 arrows: false
});
1

I had problems with hiding buttons using javascript so I try to use it with CSS

.slider button{
    display: none;
}

,but this didn't work so I use

.slider button{
    visibility: hidden;
}

It doesn't have pointer events so you will be good to go.

mocni_T
  • 179
  • 4
1

To hide the buttons using CSS only, this worked for me:

nav.slick__arrow {
  height: 0;
  overflow: hidden;
}

I have also used:

nav.slick__arrow, ul.slick-dots {
  display: none!important;
}
netgenius.co.uk
  • 139
  • 1
  • 4
1

I faced problem to remove arrows for particular view port.

This worked for me.

$('.slider').slick({
 arrows: false
});
Donald Duck
  • 6,488
  • 18
  • 59
  • 79