Skip to content

Carousel: When using autoplay, the carousel will ignore the loop: false option #2612

@questionmarcus

Description

@questionmarcus

Description

When I use the options:

const carousel = useCarousel({
  ...
  autoplay: true,
  loop: false
  ...
})

I expect that the carousel should not continue looping through the items, but this is what appears to happen.

The documentation for the Carousel also states:

You'll probably want to add loop too, so it keeps going after the last slide.
Which adds to my confusion.

Link to Reproduction (or Detailed Explanation)

https://stackblitz.com/edit/vuvcmpk4?file=src%2FApp.tsx

Steps to Reproduce

  1. Create a carousel (using hook or Root element approach, both result in the same issue)
  2. Specify the options: autoplay: true and loop: false
  3. The Carousel will continue to loop through the items

Ark UI Version

5.18.3

Framework

  • React
  • Solid
  • Vue
  • Svelte

Browser

Firefox 141

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions