Integrations / React Anchored Layer
Compatibility status.
No production snippet is shown because the current React Anchored Layer alpha accepts real element anchors only. It does not yet expose a virtual-reference contract.
anchor={caret} here would be misleading.
The smallest generic enhancement
React Anchored Layer can add support for an arbitrary Floating UI-compatible virtual reference plus an external invalidation signal. That design benefits caret anchors, pointer coordinates, canvas objects and other observable virtual references without coupling either package.
// Proposed concept only — not current API
virtualReference: VirtualElement
subscribe?: (update: () => void) => () => void
This proposal belongs in React Anchored Layer. Caret Geometry should not add React, portals, collision logic, or package-specific adapters.
Today’s React path
Use Caret Geometry with @floating-ui/dom inside a React
effect, or keep using React Anchored Layer for element-anchored
surfaces. The
Floating UI pattern is the
currently verified caret integration.