Do the pop up elements (e.g. Dropdown Menu, Popover) factor in position relative to bottom of viewport? #1708
denno020
started this conversation in
Show and tell
Replies: 1 comment 2 replies
-
Hi @denno020, They do take all of this into account. If you want to play with this behaviour, I recommend you play with the demos on the page of each component instead, for example: You can open each example in codesandbox too to play around with them further. ✌️ |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Doing a quick test on the homepage of Radix, it appears that when the dropdown menu is placed at the bottom of the viewport, it doesn't account for that fact when displaying, and displays its contents out of view:
RadixUI.Popup.elements.webm
I'm not sure if this happened because I just hacked the home page (adding a bunch of margin to an element above these components so they get pushed down), or if the components aren't viewport aware?
The obvious issues with this is usability, especially on mobile.
Further to this, is appears that the pop up elements own't adjust the height of the viewport, so if a developer uses one of them near the bottom of a viewport, a user will never be able to see the options:
RadixUI.Popup.elements.viewport.height.webm
Being viewport aware, and displaying the popup above the button would fix the issue. Similar to how base HTML select elements work.
Beta Was this translation helpful? Give feedback.
All reactions