I can see that in every example, the width of the elements with .slick-track and .slick-slider changes as the user resizes the window, which then affects the height of the carousel.
What I would like is to be able to fix the height of the carousel in such a way that the slides do not resize as I resize the browser window. Think: iTunes Store carousel.
What I have tried:
Setting:
.slick-slide { width: 500px !important; }
and in the carousel settings:
<Slider
adaptiveHeight={false}
variableWidth={false}
centerPadding={0}
autoplay
centerMode
slidesToShow={3}
slidesToScroll={1}
swipe
draggable={false}
infinite
>
This achieves the desired effect, but causes the carousel layout and navigation to break (the arrow click moves the carousel by less than the whole image and the middle slide is not centered anymore:

i have the same problem!
@vijayst @michalczaplinski try this:
.slick-slide {
height: auto; // ← that must not be ignored
}
.slick-track {
display: flex;
flex-direction: row;
flex-wrap: nowrap;
align-items: stretch;
}
Didn't the original slick library recommend using variableWidth: true?
This doesn't seem to be a problem with react-slick library. You can take a look at varaibleWidth prop if that can help in some way. Please feel free to request reopen if disagree.
@laveesingh I think it is a problem yes, the adaptiveHeight is not working correctly
Most helpful comment
@vijayst @michalczaplinski try this: