Anchors

Anchors

is a utility library for position anchoring. It helps you create floating elements like tooltips, popovers, and dropdowns, built on Floating UI's time-tested position solver.
$

Simple, Robust Anchoring

Anchor any floating element onto any other element. Use placement strategies to customize the position and behavior of tooltips, popovers, dropdowns, and more to your heart's content.

(Anchors deals with the tricky bits for you – it correctly handles scrolling, overflow, positioning, layout, and much more.)

Placement

Places your floating element relative to another element.

Click the dots
CodeSandbox

Shift

Shifts your floating element to keep it in view.

Scroll the container
CodeSandbox

Flip

Changes the placement of your floating element to keep it in view.

Scroll up
CodeSandbox

Size

Changes the size of your floating element to keep it in view.

Scroll the container
CodeSandbox

Arrow

Dynamically positions an arrow element that is center-aware.

Scroll the container
CodeSandbox

Install

Start playing via your package manager or CDN.

Package Manager

Install with npm, Yarn, or pnpm.

Get started

CDN

Install with the jsDelivr CDN.

Get started