Releases: renatodeleao/floating-ui-x
Releases · renatodeleao/floating-ui-x
floating-ui-x-vue@0.1.2
- Adds proper support for
VirtualElements
as references. Before we were incorrectly logging a warning.
floating-ui-x-vue@0.1.1
- Correct exported type definitions paths in
package.json
, so that TS users can actually access them
floating-ui-x-vue@0.1.0
First public release of floating-ui-x, where x is vue
!
The package tries to be a 1-to-1 match of @floating-ui/react-dom
(see docs):
- exports
useFloating
and supports the exact same arguments as the original package.
- Accepts reactive arguments for
placement
,strategy
andmiddleware
and re-computes position accordingly when these change. - Handles template refs bounded to raw HTMLElements or Components1
- exports
arrow
middleware, which just a forward to@floating-ui/core
arrow middleware but justunrefs
the provided element which most likely from a vue template ref. - exports a few experimental extra utils:
arrowPosition
middleware: basically mutates the providedelement
style attributes directly with the correct position, instead of you manually do it by binding the returnedmiddlewareData
computeArrowPosition
is the function under the hood ofarrowPosition
takesmiddlewareData
andplacement
as argument and computes the correct style object for the arrow to manually assigned — It basically encompasses the official tutorial "How to style the arrow" from the original package into a function to be used if desired.
-
The component should have single-root node. Consider forwarding your ref as prop if root node is not the desired element. https://vuejs.org/guide/essentials/template-refs.html#ref-on-component ↩