Closed cdwmhcc closed 5 days ago
Furthermore, the feature should include adaptive behavior. For instance, if bottom
is set but the element is obstructed by the window edge, bottom-right
should be automatically applied to ensure visibility.
This is what align
is for: https://ui3.nuxt.dev/components/dropdown-menu#content
This is what
align
is for: https://ui3.nuxt.dev/components/dropdown-menu#content
Thank you!
For what version of Nuxt UI are you suggesting this?
v3.0.0-alpha.x
Description
As of now, in Nuxt UI v3.0.0-alpha.x, the
SIDE_OPTIONS
constant is defined as follows:The current four directions cannot meet the practical development needs. For example, when there is a button on the far right of the screen to open a dropdown menu, it cannot automatically appear as 'bottom-right'.Tooltips, dropdown menus, or popovers may require positioning beyond the basic cardinal directions to avoid obscuring content or to better fit within the viewport.
Proposed Enhancement
I propose to extend the SIDE_OPTIONS constant to include combinations of the cardinal directions to allow for greater flexibility and finer control over positioning. The updated SIDE_OPTIONS would be:
Additional context