CSS Anchor Positioning Tooltips: Ditch Floating UI in 2026
CSS anchor positioning now handles tooltip and dropdown placement natively—no Floating UI needed. See 2026 browser support, syntax, and fallbacks.
By Babul Jack
CSS anchor positioning lets a browser tether a tooltip, dropdown, or popover to a trigger element — including automatic overflow handling — using only anchor-name, position-anchor, position-area, and position-try-fallbacks. It ships in Chrome and Safari today, but Firefox still hasn't shipped it, so in 2026 it is a progressive enhancement, not yet a safe default.
In client projects I've shipped more tooltips, dropdowns, and date-picker popovers than I can count, and for the last few years the default move was always the same: npm install @floating-ui/dom, wire up computePosition(), attach scroll and resize listeners, and hope the virtual-scroll container didn't break the math.
That library earned its keep. But most of what it does for a plain tooltip-on-a-button or a menu-under-a-trigger is now a solved problem in CSS. The browser already knows where the anchor element sits, it already repaints on scroll and resize, and it can now reposition a floating element relative to that anchor without a single ResizeObserver callback.
That's what the CSS Anchor Positioning Module Level 1 does, and as of late 2026 it's stable enough in two of the three major engines that I'm using it on new builds, wrapped in a feature query as a safety net.
What CSS anchor positioning actually does
The spec, maintained by the W3C CSS Working Group, defines two roles: an anchor element and a target element (CSS Anchor Positioning Module Level 1). The target must already use position: absolute or position: fixed — anchor positioning is an extension of positioned layout, not a new layout mode.
The four properties you actually need
anchor-name — give the trigger element a name, e.g. --tip-trigger.
position-anchor — tell the floating element which anchor to attach to.
position-area — place it on a 3x3 grid around the anchor (top, bottom center, top left, and so on).
position-try-fallbacks — list alternate position-area values the browser should try automatically when the first one would overflow the viewport.
That's the entire positioning layer for a tooltip that flips to the opposite side when it would run off-screen. No JavaScript, no scroll listener, no bundle. Developer Josh Comeau's walkthrough of the API covers this exact pattern and the flip-block keyword in detail, including how it also flips directional margins automatically (Getting Started with Anchor Positioning).
CSS anchor positioning browser support in 2026
This is the part founders and engineering leads actually need before committing to it in production. According to the Web Platform Dashboard's feature tracker, support looks like this as of late November 2026:
Browser
Status
Chrome / Edge
Supported (current stable: Chrome 157, Nov 3 2026; Edge 157, Nov 5 2026)
Safari / Safari iOS
Supported since Safari 27 (released Sept 14, 2026)
Firefox / Firefox for Android
Not supported — positive standards position, tracked in Bugzilla #1838746
Chromium browsers have supported the core module since mid-2024 and Safari joined in late 2025, but Firefox's absence matters more than a single missing browser usually would: the Web Platform Dashboard explicitly lists anchor positioning's Baseline availability as "blocked since November 2026 by Firefox." Baseline is the cross-browser signal teams use to decide when a feature is safe to use without a fallback — and this one isn't there yet.
There's a second tier to be aware of too: Anchor Positioning Level 2, which adds anchored container queries so you can detect which fallback position is active (useful for flipping a tooltip's caret), is currently Chromium-only. WebKit and the Interop group have it on the roadmap, but it hasn't landed elsewhere as of this writing.
Will Firefox ship it, and when?
Mozilla's own standards-positions tracker marks anchor positioning as "positive," meaning Firefox intends to implement it — it just hasn't yet. Anchor positioning is also one of the carryover focus areas in Interop 2026, the joint effort between Apple, Google, Igalia, and Mozilla to close cross-browser gaps on shared priority features. WebKit's own Interop 2026 announcement frames this year's anchor-positioning work as "clarifying the spec, resolving test issues, and increasing the reliability" of the feature — not introducing it to a new engine. That's a reasonable signal that Firefox support is coming, but there's no shipped version or date to point to yet, so plan around what's actually in stable browsers today.
How to use it safely today (without breaking Firefox users)
Step 1: Feature-detect with @supports
Wrap the anchor positioning rules in a @supports block so Firefox users fall back to a static position instead of a broken layout:
Step 2: Pair it with the Popover API for stacking and dismissal
Anchor positioning only answers "where should this element sit?" — it says nothing about focus trapping, Escape-key dismissal, or rendering above everything else on the page. That's the Popover API's job. Interop 2026 is also shipping refinements here: a closedby attribute for controlling how dialogs are dismissed, and a popover="hint" value specifically meant for tooltip-style popovers that shouldn't close an already-open menu. Combining popover with anchor positioning gives you the full stack Floating UI used to own: placement from CSS, top-layer rendering and dismissal from the Popover API.
Step 3: Decide where you still need a JS library
In practice, I still reach for a positioning library when:
The anchor is a virtual element — following a cursor or a selection range rather than a real DOM node.
You need collision detection against an arbitrary scroll container, not just the viewport.
You must support Firefox or older Safari without a visibly degraded layout.
You need complex entry/exit animations tied to the computed position.
For a standard tooltip, dropdown menu, or popover anchored to a trigger button, native CSS now covers the common case. The OddBird anchor positioning polyfill is worth knowing about if you need Firefox parity sooner, though it doesn't cover the Level 2 container-query features and has documented limitations.
Step 4: Measure the interaction cost, not just the bundle size
Dropping a JS positioning library removes scroll and resize event listeners that previously ran on the main thread during every interaction — which matters if you've been chasing Interaction to Next Paint regressions on menu-heavy interfaces. Fewer recalculation callbacks on scroll is a genuine, measurable win, separate from the bundle-size argument everyone leads with.
A migration checklist
Audit where you currently use Popper.js, Floating UI, or a hand-rolled getBoundingClientRect() positioning function.
Identify which of those are simple trigger-anchored tooltips, dropdowns, or menus — the cases anchor positioning covers well.
Rewrite them behind an @supports (position-area: top) check, with a sane static fallback.
Pair the positioned element with popover where you also need top-layer stacking and light-dismiss behavior.
Keep the JS library only for virtual anchors, custom scroll-container collision detection, or until you drop Firefox support entirely.
Re-test on Safari, since Level 1 behavior shipped there only in September 2026 and edge cases are still being reported.
How does this fit a modern frontend stack?
If you're already on React 19's compiler-driven rendering model, you've likely been re-evaluating which client-side logic still needs to exist at all — the same question we asked when reviewing whether the React Compiler was production-ready. Anchor positioning is the CSS-side version of that trend: logic that used to require JavaScript and a render-blocking effect now lives declaratively in the stylesheet, which also helps with soft-navigation Core Web Vitals in single-page apps, since there's less script running on every route transition.
When a team brings me in for a web app development engagement, removing dead JavaScript weight from the UI layer is one of the first audits I run — positioning libraries used only for simple tooltips and menus are a recurring, easy win.
Frequently asked questions
What is CSS anchor positioning used for?
It positions one element (a tooltip, dropdown, popover, or badge) relative to another "anchor" element declaratively in CSS, including automatic repositioning when the preferred placement would overflow the viewport.
Can CSS anchor positioning replace Floating UI or Popper.js?
For the common cases — a tooltip or dropdown anchored to a trigger button — yes, in Chrome and Safari today. You'll still want a JS library, or a Firefox-safe fallback, for virtual anchors, custom scroll-container collision detection, or until Firefox ships support.
Does Firefox support CSS anchor positioning?
Not as of late November 2026. Mozilla's standards position on the feature is "positive," and it's listed as a tracked bug (#1838746) and a carryover focus area in Interop 2026, but no shipped Firefox version supports it yet.
What does position-try-fallbacks do?
It lists alternate position-area values the browser should try, in order, whenever the current placement would overflow its container — for example, flipping a tooltip from above a button to below it, without any JavaScript recalculation.
Is CSS anchor positioning "Baseline" yet?
No. The Web Platform Dashboard lists it as Baseline-blocked since November 2026, specifically because Firefox hasn't shipped it. Use @supports feature detection until all three major engines support it.
Key takeaways
CSS anchor positioning (anchor-name, position-anchor, position-area, position-try-fallbacks) now handles tooltip, dropdown, and popover placement natively in Chrome/Edge and Safari (since Safari 27, September 2026).
Firefox has not shipped it; the feature's Baseline status is explicitly blocked by Firefox as of November 2026, so treat it as progressive enhancement behind @supports.
Anchor positioning Level 2's anchored container queries, useful for flipping a tooltip's caret, are currently Chromium-only.
Pair it with the Popover API — especially the newer popover="hint" value from Interop 2026 — for top-layer rendering and dismissal behavior that positioning alone doesn't provide.
Keep a JS positioning library only for virtual anchors, non-viewport collision detection, or full Firefox parity; for standard trigger-anchored UI, native CSS is the simpler and lighter choice in 2026.