overlay-infrastructure
core305 linesSource
Six shared infrastructure modules under all overlay components. DismissableLayer (stacking, outside dismiss, pointer event blocking, Branch for anchor exemption). FocusScope (trapping, looping, auto-focus on mount/unmount). FocusGuards (sentinel spans for portaled content). Portal (SSR-safe createPortal via useLayoutEffect). Popper (Floating UI positioning, CSS custom properties, collision/flip/arrow). Presence (animation state machine: mounted/unmountSuspended/unmounted). Use this skill when building a custom overlay; prefer component skills (dialog, popover) when using existing primitives.