On this page
Overview
Floating UI positions floating elements such as tooltips, popovers, and dropdowns relative to anchors while adjusting placement to avoid viewport collisions. Its React package combines positioning with hooks for hover, focus, click, dismiss, and other interactions used to build accessible floating UI.
Features and best fit
Based on official documentation; not hands-on tested · Content checked:
Key features
Position anchored floating elements while handling viewport collisions
The library computes coordinates from reference and floating-element geometry, with middleware such as offset, flip, and shift for spacing, collision avoidance, and placement adjustments.
Compose positioning and interaction hooks in React
@floating-ui/react combines React DOM positioning with hooks and components for user interactions such as hover, focus, click, and dismiss.
Choose packages for DOM, React, Vue, React Native, or custom platforms
The monorepo includes @floating-ui/dom, @floating-ui/react, @floating-ui/react-native, @floating-ui/vue, and @floating-ui/core, so applications can select the platform and feature scope they need.
Sources: [1]
Best fit
Before adoption
React package 0.27.20 requires React and React DOM 17 or later
Package metadata declares React and React DOM >=17.0.0 as peer dependencies. Other platforms should use their corresponding package.
Sources: [2]
Version 0.27.20 fixes scroll-listener and TypeScript optional-property behavior
The patch removes redundant passive options from scroll listeners and supports explicit undefined for optional properties when exactOptionalPropertyTypes is enabled.
Sources: [3]
Official sources
- [1]Floating UI README(2026-10-05)
- [2]@floating-ui/react 0.27.20 package metadata(2026-10-05)
- [3]@floating-ui/react 0.27.20 release(2026-10-05)
- [4]Floating UI React documentation(2026-10-05)
- [5]Floating UI MIT license(2026-10-05)
Supplemental curator note
Choose the package by scope: @floating-ui/react-dom for positioning-only React DOM usage or @floating-ui/react when interaction hooks are also needed.
Try it in 3 steps
- 1
Install pinned Floating UI React 0.27.20
Create an isolated npm project with the React package and exact peer dependencies.
demo=$(mktemp -d "${TMPDIR:-/tmp}/floating-ui.XXXXXX") && cd "$demo" && npm init -y >/dev/null && npm install --save-exact @floating-ui/react@0.27.20 react@19.2.0 react-dom@19.2.0 - 2
Verify the package version
Require the installed React package to match the reviewed version.
test "$(node -e "console.log(JSON.parse(require('fs').readFileSync('node_modules/@floating-ui/react/package.json')).version)")" = '0.27.20' - 3
Check positioning and interaction exports
Verify representative positioning middleware and React interaction hooks without starting a DOM.
test "$(node --input-type=module -e "import * as F from '@floating-ui/react'; console.log(['useFloating','offset','flip','shift','useHover'].every(k=>k in F))")" = 'true'
Growth
Growth trends · Last 30 days
32,756 Stars
Trend data is still being collected.
Development activity
Last 90 days · weekly
- Commits (last 30 days)
- 3
- Open PRs
- 31
Development activity is still being collected.
Built with
Categories and tags
Categories
GitHub data
GitHub dataView detailed GitHub data
GitHub Topics
- positioning-engine
- tooltip
- position
- dropdown
- popover
- positioning
- tooltip-position
- popovers
- hacktoberfest
- Stars
- 32,756
- Forks
- 1,716
- Watchers
- 255
- Open issues
- 38
- Contributors
- 126
- Owner type
- Organization
- Primary language
- TypeScript
- License
- MIT
- Repository last updated
- Sep 28, 2026
Related information
Write a related articleShare a guide or use case for this OSS in Markdown. Articles are published after administrator approval.
Explore next
- styled-components41,099 Stars
3 shared tag(s) · 1 shared category(s) · Same language
CSS-in-JS for React using tagged templates with scoped styles, theming, SSR, and React Native support
TypeScript - React Three Fiber32,733 Stars
3 shared tag(s) · 1 shared category(s) · Same language
React renderer that builds Three.js scenes declaratively with components and JSX
TypeScript - React Redux23,424 Stars
3 shared tag(s) · 1 shared category(s) · Same language
official bindings that subscribe React components to a Redux store and dispatch state updates
TypeScript - flatpickr16,464 Stars
3 shared tag(s) · 1 shared category(s) · Same language
pick dates, times, ranges, and multiple days with a dependency-free UI and configurable disabled dates and locales
TypeScript - Linaria12,350 Stars
3 shared tag(s) · 1 shared category(s) · Same language
keep CSS-in-JS authoring while extracting styles to static CSS at build time
TypeScript - IMask5,182 Stars
3 shared tag(s) · 1 shared category(s) · Same language
apply phone, number, date, and other input masks while separating displayed, unmasked, and typed values
TypeScript
Report incorrect information
Tell us if any listing information is incorrect or outdated.