# floating-ui/floating-ui

A JavaScript library to position floating elements and create interactions for them.

Repository: https://github.com/floating-ui/floating-ui
Canonical: https://ross.abutalabs.com/products/floating-ui
Homepage: https://floating-ui.com
Language: TypeScript
License: MIT
License Family: permissive
Topics: positioning-engine, tooltip, position, dropdown, popover, positioning, tooltip-position, popovers, hacktoberfest
Last push: 2026-08-26T13:32:18+00:00

## Health v2 (maintenance only)
Score: 93/100 (v2, computed 2026-09-03T02:39:23.370411+00:00)
- activity 99, release rhythm 80, longevity 100
- inputs: {"age_days": 3809, "days_push": 7, "days_rel": 53, "gap_med": 0, "n_releases_24m": 68}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 32709, forks 1696 (observed 2026-08-28T04:11:57.839718+00:00)

## What it is
Floating UI is a small JavaScript/TypeScript library for positioning floating elements like tooltips, popovers, and dropdowns anchored to reference elements, with viewport collision avoidance. It also provides React hooks and components for building accessible floating UI interactions.

## Use cases
- position a tooltip next to a button
- create an accessible dropdown menu in React
- keep a popover in view when scrolling
- build a combobox or select menu
- avoid viewport collisions for floating elements
- anchor an element to the mouse cursor
- build headless UI components like dialogs and hover cards

## When to choose
- you need robust anchor positioning with collision detection for tooltips, popovers, or menus
- you want low-level primitives to build your own accessible floating components
- you need framework-agnostic positioning or React Native support
- bundle size matters and you want tree-shakeable, modular code

## When to avoid
- you want pre-built, styled UI components out of the box
- you only need simple CSS-only positioning without dynamic collision handling
- you are not working in a DOM or React environment

## Facets
- artifact type: library
- maturity: stable
- function: ui-components, frontend-framework, animation
- domain: frontend, web-development, accessibility, developer-tools
- platform: browser, cross-platform
- tags: tooltip-positioning, popover, dropdown, anchor-positioning, react-hooks, headless-ui, collision-detection, typescript, nodejs, web-server

## Member repositories
- floating-ui/floating-ui (main) score 93

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:11:57.839718+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T16:51:54.754549+00:00, confidence not recorded.
  - readme: https://github.com/floating-ui/floating-ui (fetched 2026-08-28T04:11:57.839718+00:00, sha 3b914ba0d0bb)
  - homepage: https://floating-ui.com (fetched 2026-08-29T07:49:10.386083+00:00, sha 4ed9df4a68e2)
  - site_page: https://floating-ui.com/docs/getting-started (fetched 2026-08-29T07:49:10.396346+00:00, sha 844de5935f25)
  - site_page: https://floating-ui.com/docs/react (fetched 2026-08-29T07:49:10.398558+00:00, sha 475bbb455f31)
- Data as of 2026-08-30T08:39:29.467469+00:00.
