react-spectrum
react-spectrum copied to clipboard
Horizontal / cross axis flipping for popovers
Provide a general summary of the feature here
Popovers already support flipping the vertical placement. Should they also support flipping the horizontal placement aka cross axis? That would avoid awkward looking popovers such as this:
Reduced test case: https://stackblitz.com/edit/vitejs-vite-7ahmt11q?file=src%2Fmain.css,src%2FApp.tsx&terminal=dev
I believe Floating UI has this behaviour: https://floating-ui.com/docs/flip#crossaxis
๐ค Expected Behavior?
See above.
๐ฏ Current Behavior
See above.
๐ Possible Solution
See above.
๐ฆ Context
See above.
๐ป Examples
No response
๐งข Your Company/Team
Unsplash
๐ท Tracking Issue
No response
Seems like a reasonable feature to support. Though to be totally honest, we're hoping not to do too much work on our overlay positioning code and instead move to native CSS anchor positioning in the future.