flowbite
flowbite copied to clipboard
Carousel still buggy with 2 items on version 2.3.0
Describe the bug If you create a carousel containing only 2 Images, the Animation when sliding, does not looks right
To Reproduce Using the 2.3.0 version from jsDelivr, in this example the bug is clear: codepen
Expected behavior Even if there are only two Items in the Carousel I expect to have the right animations.
Desktop (please complete the following information):
- OS: macOs Sonoma 14.4.1
- Browser safari (17.4.1), chrome (125.0.6422.113)
I think the carousel component's logic should be rewritten. The source code considers 3 conditions/items (left, middle, right), and translate -100% (the last item) and 100%(the second item) for left and right item.
Therefore, the visual look for navigating between 2 items is strange.
Do you happen to know if will be fixed in the near future?
We're looking into it, but anyone is more than welcome to create a PR for this one. I'll check it. Thanks!