You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I am implementing a carousel and would like to have an option in the machine to favor instant scroll behavior (auto) for the carousel controls:
prev button
next button
indicators
🧱 Problem Statement / Justification
I am aware that some methods allow to pass an instant(boolean) argument: scrollNext, scrollPrev, scrollTo, scrollToIndex, but it requires me to rewire every event handler, prevent the default behavior from zag and implement my own logic using those methods.
I figure it would be better to simply have a parameter for the machine ?
✅ Proposed solution or API
carousel.machine({
scrollBehavior: 'auto' // default is "smooth". Instead of "auto" it could be "instant" for clarity.
})
This discussion was converted from issue #2211 on February 02, 2025 18:15.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
🚀 Feature request
Hello, I am implementing a carousel and would like to have an option in the machine to favor
instant
scroll behavior (auto) for the carousel controls:🧱 Problem Statement / Justification
I am aware that some methods allow to pass an
instant
(boolean) argument:scrollNext, scrollPrev, scrollTo, scrollToIndex
, but it requires me to rewire every event handler, prevent the default behavior from zag and implement my own logic using those methods.I figure it would be better to simply have a parameter for the machine ?
✅ Proposed solution or API
Beta Was this translation helpful? Give feedback.
All reactions