Skip to content

RFC: Be able to define fallback order for Popup position #2359

@WiNloSt

Description

@WiNloSt

The behavior of a Popup is if our desired position doesn't fit in the viewport, the component will calculate the next possible fallback position based on a predefined constant POSITIONS.

While this is convenient that users doesn't need to defined their own fallback position order. Some users, like me, might prefer having another fallback order for visual purpose. So, being able to override this POSITIONS variable somehow would benefit in this case.

I imagine if there would be something like this

<Popup
  trigger={<Icon name="heart" color="red" size="large" circular />}
  content="I am positioned to the top left"
  position="top left"
  fallbackPositions={["bottom left", "bottom center"]}
/>

What do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions