nuka-carousel
nuka-carousel copied to clipboard
Cannot manually set the slide width in v5
Looking up the documentation on v4, I came across this CodeSandBox and played around with controls to see how it handled compared to v5. I like it better.
What I want to do in v5 is this:
three large slides but not fit into the container such that the middle slide is in full view and the outer two are cropped. v3 did this, v4 did this. v5 seems to brag about removing this useful feature.
I would like slideWidth
or initialSlideWidth
to be added back in as overrides.
Describe Your Environment
- What version of nuka-carousel are you using?
5.2.0
- What version of React are you using?
16.12.0
requiing an upgrade to @17, which nuka-carousel@3 conflicts with - What browser are you using? MacOS Desktop Chrome Version 109.0.5414.119
Describe the Problem
All slides are equally fit into the Carousel rather than being the size I dictate
This is fixed in the latest release https://github.com/FormidableLabs/nuka-carousel/commit/84ee1252bba7268c58ab48f4037d6ec5a3b1f55d
Great news!
Can someone provide an example of how to accomplish OP's example? Is there a way to set the slideWidth only on the active slide and have the other's adjust?
Slidewidth is entirely controlled by the consumer now in v8, with support for multiple slide widths.