Library
UI ComponentsFloating UI
Positioning toolkit for tooltips, popovers and anchored overlays.
ExperimentalActive
Experimental
Compatibility is possible but still being validated for production Preact use.
Package@floating-ui/dom
npm install @floating-ui/domimport { computePosition } from "@floating-ui/dom"; await computePosition(buttonEl, tooltipEl, { placement: "bottom-start" });Introduction
Floating UI is especially relevant for tooltips, dropdowns and popovers because its DOM primitives are framework-agnostic.
Preact configuration
The DOM package can be used directly without React bindings.
SSR notes
Position calculations happen in the browser, so render a sensible static fallback on the server.
Islands notes
A strong fit for small interactive overlays inside otherwise static pages.