@floating-ui/react
0.27.20 · 11 Jul 2026MIT34.1M / weekRepositoryHomepagenpmAtom feed
0.27.20 is the newest release of 0.21.x.
In short
1 deprecated1 new12 fixed3 internal
- Deprecated
useTypeahead: Add
onTypingChangecallback to allow setting a local ref and deprecatecontext.dataRef.current.typingvalue
Release note
New Features
useClientPointinteraction hookThis hook provides the ability to position the floating element relative to a client "point" reference. By default, "client" means mouse event coordinates since they possess
clientX/Yvalues, so it follows the cursor when open. You can also use explicitxandyclient coordinates.If you've used Tippy.js, it provides similar functionality to
followCursorwhile being a bit more general.const clientPoint = useClientPoint(context, { enabled?: boolean, // Restrict the client point to an axis, use the DOM // reference as the other axis axis?: 'both' | 'x' | 'y', // Position explicitly at these client coordinates x?: number | null, y?: number | null, });
Refactors
- Deprecated
useTypeahead: Add
onTypingChangecallback to allow setting a local ref and deprecatecontext.dataRef.current.typingvalue
Bug Fixes
useFloating: Return extended
elementsfrom hookuseListNavigation: Use mounted rather than open state to focus parent floating in tree
FloatingFocusManager: Make
initialFocusandreturnFocusnon-reactiveShare
floatingIdviacontextobjectFloatingFocusManager: Reset preventing
returnFocuswithcloseOnFocusOut={false}when tabbing out then back inFloatingFocusManager: Mutate internal preventReturnFocusRef instead of returnFocusRef
useTypeahead: Improve logic
Reset timeout from a non-match
Don't require a
rolebe set and stop propagation/prevent default if typeahead is in use
FloatingFocusManager: Ensure
returnFocusof a nested floating element can return to a root reference if it wasn't focused upon open (such as with a pointer)FloatingArrow: Prevent transparency overlap if the floating element border and stroke are both partially transparent
FloatingFocusManager: Ensure
initialFocusworks if re-opening floating element while it was transitioning outFloatingArrow: Ensure correct vertical size with larger stroke widths
FloatingArrow: Allow
height>width
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.