Custom placements for popovers & menus #794
-
As I see this package is relying on PopperJS for all the placements, can we have a prop on these components to customise their placement? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 6 replies
-
I had an easy enough time following the docs on how to do this, at least with the popover: |
Beta Was this translation helpful? Give feedback.
-
Hey! Thank you for your question! We are not relying on it, we are using it in the examples. You can use any library for it if you want. Here is an example on how you can use Popper with the Vue version of Headless UI: https://github.com/tailwindlabs/headlessui/blob/main/packages/%40headlessui-vue/examples/src/components/menu/menu-with-popper.vue |
Beta Was this translation helpful? Give feedback.
-
Hi! I create a package Headless UI Float, that can be easy to position floating Headless UI elements using Floating UI (is new version Popper.js), support Transition & Portal. If you need to float Headless UI element can try it out 😊 |
Beta Was this translation helpful? Give feedback.
Hey! Thank you for your question!
Much appreciated! 🙏
We are not relying on it, we are using it in the examples. You can use any library for it if you want.
Since we are not relying on it, it doesn't really make sense to provide a prop for it.
Here is an example on how you can use Popper with the Vue version of Headless UI: https://github.com/tailwindlabs/headlessui/blob/main/packages/%40headlessui-vue/examples/src/components/menu/menu-with-popper.vue