airblade / headlessui-stimulus

Stimulus components for Headless UI
https://headlessui-stimulus.com
MIT License
7 stars 1 forks source link

Replace custom popover with `[popover]` once CSS anchor positioning available #6

Open airblade opened 3 weeks ago

airblade commented 3 weeks ago

https://developer.mozilla.org/en-US/docs/Web/API/Popover_API

The popover API is now supported everywhere. However CSS anchor positioning is not yet widely supported.

airblade commented 3 weeks ago

Or use the Popover API now and handle positioning with JavaScript.

HeadlessUI v2 has adopted Floating UI for positioning, so perhaps we could / should too.

See for example https://frontendmasters.com/blog/using-the-popover-api-for-html-tooltips/#the-positioning.