chakra-ui / ark

Ark UI is a headless UI library with over 45+ components designed to build scalable Design Systems that works for a wide range of JS frameworks.
https://ark-ui.com
MIT License
3.8k stars 109 forks source link

React Carousel forces sliding animation when using `defaultIndex` #3043

Open itsJimmyQ opened 1 week ago

itsJimmyQ commented 1 week ago

Description

When I use defaultIndex prop, I expect the carousel to be rendered with that slide initially. But instead, it would render the first image then slide through all the slides inbetween with a slide animation to the chosen default image.

Link to Reproduction (or Detailed Explanation)

See steps.

Steps to Reproduce

  1. Implement a basic Ark UI carousel (Reect)
  2. Have more than 1 image
  3. Set prop defaultIndex to be larger than 0

Ark UI Version

4.4.0

Framework

Browser

No response

Additional Information

No response