Packages

@floating-ui/react

0.27.20 · 11 Jul 2026MIT34.1M / weekRepositoryHomepagenpmAtom feed

Your version

0.15.0

26 Dec 2022Where it was published

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

  • useMergeRefs hook

  • FloatingDelayGroup: Add timeoutMs prop

    If 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 timeoutMs prop. 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 + animationDurationMs

  • useListNavigation: scrollItemIntoView option

    Any external effects that were handling .scrollIntoView() manually can now be removed and instead use this option, which supports boolean | ScrollIntoViewOptions. It's true by default, using nearest options.

  • positionReference callback ref

    This 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.current not refs.reference.current (which is always wide).

Bug Fixes

  • FloatingFocusManager: Avoid returning focus to reference after unhovering

  • FloatingFocusManager: Prevent closing on focusout when moving from non-portalled floating element to nested portalled floating element

  • safePolygon: Use real polygon for blockPointerEvents option

    This 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.