FormidableLabs / nuka-carousel

Small, fast, and accessibility-first React carousel library with an easily customizable UI and behavior to fit your brand and site.
https://commerce.nearform.com/open-source/nuka-carousel
Other
3k stars 596 forks source link

Cannot manually set the slide width in v5 #994

Closed andrewdowis closed 2 months ago

andrewdowis commented 1 year ago

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:

image

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

Describe the Problem

All slides are equally fit into the Carousel rather than being the size I dictate

allypalanzi commented 1 year ago

This is fixed in the latest release https://github.com/FormidableLabs/nuka-carousel/commit/84ee1252bba7268c58ab48f4037d6ec5a3b1f55d

andrewdowis commented 1 year ago

Great news!

alxvallejo commented 1 year ago

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?

carbonrobot commented 2 months ago

Slidewidth is entirely controlled by the consumer now in v8, with support for multiple slide widths.