flowbite icon indicating copy to clipboard operation
flowbite copied to clipboard

Carousel still buggy with 2 items on version 2.3.0

Open FedericoDeBona opened this issue 1 year ago • 3 comments

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)

FedericoDeBona avatar May 31 '24 09:05 FedericoDeBona

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.

Lexachoc avatar Jun 01 '24 23:06 Lexachoc

Do you happen to know if will be fixed in the near future?

FedericoDeBona avatar Jun 03 '24 07:06 FedericoDeBona

We're looking into it, but anyone is more than welcome to create a PR for this one. I'll check it. Thanks!

zoltanszogyenyi avatar Jun 03 '24 07:06 zoltanszogyenyi