akiran / react-slick

React carousel component
http://react-slick.neostack.com/
MIT License
11.72k stars 2.1k forks source link

React-slick max height property #2189

Closed adimchithecreator closed 1 year ago

adimchithecreator commented 1 year ago

This is my first time using react slick in my project and i'm unable to set a max height property.

Can anyone help me with this ?

ShedrackGodson commented 1 year ago

Any update on this issue pls?

adimchithecreator commented 1 year ago

This was how i fixed it, i'm not sure if it's the most conventional way but it works.

<----to set the max-height of the slick-list container----> .slick-list{ max-height: 14rem ; }

<----to set the max-height of the images in the carousel----> .slick-list img{ width: 100%; height: 14rem; }

pratyushbh commented 1 year ago

Unfortunately max-height property is not the part of original jQuery plugin from which react-slick is based upon

akiran commented 1 year ago

You can accomplish this with CSS as @adimchithecreator suggested