@floating-ui/react
0.27.20 · 11 Jul 2026MIT34.1M / weekRepositoryHomepagenpmAtom feed
0.27.20 is the newest release of 0.15.x.
In short
5 new3 fixed1 internal
Release note
New Features
useDismiss: Allow specifying different value for outside press bubbling and escape key bubbling
useMergeRefshookFloatingDelayGroup: Add
timeoutMspropIf there's no close delay, you might still want the delays to end up grouped even if none of the tooltips are currently open within a certain period of time. Instead of relying on the close delay, you can instead rely on the
timeoutMsprop. This also helps with unmounting animations if you want to allow it to be interruptible and continue grouping even if there is a close delay, e.g.timeoutMs = closeDelayMs + animationDurationMsuseListNavigation:
scrollItemIntoViewoptionAny external effects that were handling
.scrollIntoView()manually can now be removed and instead use this option, which supportsboolean | ScrollIntoViewOptions. It'strueby default, usingnearestoptions.positionReferencecallback refThis adds a dedicated API to separate the events reference from the positioning reference and is more reliable than the previous technique suggested in the docs.
You can call it with a real element or a virtual element:
function App() { const {reference, positionReference} = useFloating(); return ( <> <div ref={reference} /> <div ref={positionReference} /> </> ); }As a result, the generic reference type is now narrowed on
refs.domReference.currentnotrefs.reference.current(which is always wide).
Bug Fixes
FloatingFocusManager: Avoid returning focus to reference after unhovering
FloatingFocusManager: Prevent closing on
focusoutwhen moving from non-portalled floating element to nested portalled floating elementsafePolygon: Use real polygon for
blockPointerEventsoptionThis prevents unwanted side effects compared to the previous "global holes" strategy.
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.