on-internet
← Community

How to properly create a popup component in Vue 3

Stack Overflow ·

As part of becoming a better Vue programmer, I am trying to implement a popup similar to Popper with a clean and Vueish architecture. Here is a simple schematic that I came up with: So basically there is a target component, which is the reference for the popup's position. The popup can be positioned above, below, right and left of the target, therefore I will need to have access to the target element in my popup. Also, the target can be an arbitrary component. It can be a simple button or span, but also something much more complex. Then there is the popup itself, which will be put into a modal

Comments

Sign in or sign up to comment and upvote.

No comments yet.