Components
← All components

Anchored Positioning

stimeo--anchored

Positions a floating element against an anchor, flipping/shifting it away from edges.

The stimeo--anchored controller is the declarative surface of the opt-in stimeo-ui/positioning engine (floating-ui based) — it keeps a floating element placed against an anchor and flips/shifts it away from viewport edges as the page scrolls or resizes (floating-ui autoUpdate as a controller). It writes only position/left/top inline styles — never decoration — and mirrors the resolved (post-flip) side onto data-anchored-placement on the floating element for CSS hooks such as an arrow. active drives tracking: set it false while the floating element is hidden so no measurement runs; the other values map to the engine and re-apply live. It emits position on each update. Behavior only — it does not open/close, manage focus, or move DOM (pair with Dialog/Popover, Focus Scope, and Portal). It ships in the opt-in stimeo-ui/positioning subpath, so the core import stays zero-dependency; only consumers who register it pull in floating-ui — this demo's JS imports the subpath and registers stimeo--anchored.

running

The panel is positioned against the anchor. Choose a side; the panel shows the resolved placement (flip/shift may change it near an edge).