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
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
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone,
I'm trying to implement a specific behavior for the select component that I really like from Base UI's Select.
The Desired Behavior:
In the Base UI Select component, the dropdown list automatically scrolls to keep the selected item aligned with the trigger.
On Open: The list scrolls so the currently selected item appears directly where the trigger was.
The key effect is that the user's focal point remains stable, which creates a very smooth experience.
You can also try it live on their documentation page: base-ui Select
I'm not sure if there's a built-in or more idiomatic "Zag.js way" to handle this. Any advice or examples would be fantastic.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions