Hi all,
I am using react slick slider, if i add it in a SP Modern page full section(3 slides) it works perfectly.but if i placed it in the One-third right sections. The same 3 slides appeared with conjusted width even in al sections but i want it to reduce into 2 or 1 slides as per the placed section width.
What should i do to reduce the slides when it is placed on diferrent sized zones.
I have placed code below.
JavaScript
export default class ReactSlickSlider extends React.Component {
public render(): React.ReactElement {
var settings = {
dots: true,
infinite: false,
speed: 500,
slidesToShow: 4,
slidesToScroll: 4,
initialSlide: 0,
responsive: [
{
breakpoint: 1024,
settings: {
slidesToShow: 3,
slidesToScroll: 3,
infinite: true,
dots: true
}
},
{
breakpoint: 600,
settings: {
slidesToShow: 2,
slidesToScroll: 2,
initialSlide: 2
}
},
{
breakpoint: 480,
settings: {
slidesToShow: 1,
slidesToScroll: 1
}
}
]
};
return (
Responsive
Lorem Ipsum is simply dummy text of the printing and typesetting industry.
Lorem Ipsum is simply dummy text of the printing and typesetting industry.
Lorem Ipsum is simply dummy text of the printing and typesetting industry.
Lorem Ipsum is simply dummy text of the printing and typesetting industry.
Lorem Ipsum is simply dummy text of the printing and typesetting industry.
Lorem Ipsum is simply dummy text of the printing and typesetting industry.
Lorem Ipsum is simply dummy text of the printing and typesetting industry.
Lorem Ipsum is simply dummy text of the printing and typesetting industry.
);
}
}Thanks in advance!

Vaibhav ChauhanRank #963 · 2.1K reputationPosted Jun 13, 2021, 12:55 PM EDT
parthasarathy BRank #1,732 · 874 reputationPosted Jun 14, 2021, 12:41 AM EDT
Hi Vaibhav,
I accept this a alternate solution but Is that the only way ?can't we make it slides reduced as per the section size?
Vaibhav ChauhanRank #963 · 2.1K reputationPosted Jun 14, 2021, 1:05 AM EDT