Skip to content

Side

Side = "top" | "bottom" | "left" | "right"

Defined in: ui/src/positioning.ts:15

Headless positioning engine for floating UI (tooltips, popovers, menus).

Pure math — no PixiJS, no React, no engine types. Given a reference rect (the trigger, in screen-space px), the floating element’s size, and the viewport, it resolves a screen-space top-left for the floating element applying a small Floating-UI-style middleware pipeline:

place → flip (main axis) → shift (cross axis) → size (available space)

Everything here is unit-tested in isolation; the Pixi/React layer only feeds it rects and consumes { x, y, placement, available }.