breakPoints
This is the coolest feature and one of the main reasons that react-elastic-carousel
was written.
The breakPoints
array, allows you to set different props
for different sizes of the element, regardless to the window's size.
This is due to the fact that react-elastic-carousel
is listening to the element's resize
event instead of the window.
You can pass an array of objects that will signal react-elastic-carousel
to change props like itemsToShow
and itemsToScroll
(and others) on different width
values.
ANY prop can be passed directly to React Elastic Carousel or via a the breakpoint object. Keep in mind that a prop passed via a breakpoint will override a direct prop.
Example
(Resize the container to see the changes...)