user5797064
user5797064

Reputation:

Nuka Carousel heightMode don't work in react

I have a nuka carousel with 3 slides and the height of the slides depends on the size of the content. So if one slide has 5 rows of text and another has 6 rows of text the one will be higher than the other.

So to fix this I found a heightMode prop where the slides height will be set after the tallest slide but when I test locally it doesn't do anything.

Is there any way to change slideHeight manually?

Does anybody know if heightMode prop is working or not?

Upvotes: 1

Views: 2270

Answers (1)

Keyrr Perino
Keyrr Perino

Reputation: 81

I also encountered this problem and here's my fix. I Just added some css code:

.slider-list {
    height: auto!important;
}

.slider-slide {
    position: sticky!important;
}

Upvotes: 5

Related Questions