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
3.03k stars 597 forks source link

Partially show unselected slides #753

Closed DTAPigeons closed 3 years ago

DTAPigeons commented 3 years ago

Hello, I am currently using the carousel to display several react components which are a combination of text and images. Is there a way to implement a behaviour where one component is shown in focus and the next and/or previous components are only partially visible on both sides of the focused component?

sarmeyer commented 3 years ago

Hi @DTAPigeons - you can do this by adjusting the slidesToShow prop. By passing a non-whole number (ex 1.25) you will show partial slides. From there you can adjust cellAlign to display the slides how you'd like.

Let me know if you have any other questions!

FrankFan commented 3 months ago

hello, I met the same issue in 2024.

use nuka-carousel: 7.0.0

image

only partially visible on right, how to also partially visible on left ?