IScrollStrategyData
interface
Scroll
Runtime data bag passed to every TScrollStrategyFn. Gives the strategy access to the overlay root element, content element, positioning target, active state flag and the update-location callback to recompute floating position.
TypeScript
Definition
The TypeScript interface definition as found in the origam source. Click the copy icon to copy the snippet.
API
Properties
Every property declared by this interface, with its type, optionality and default.
- rootrequiredRef<HTMLElement | undefined>
- The overlay root element whose scroll listeners are managed by the strategy.
- contentElrequiredRef<HTMLElement | undefined>
- The floating content element (tooltip bubble, menu panel, …).
- targetElrequiredRef<HTMLElement | undefined>
- The anchor / activator element that the floating panel is positioned relative to.
- isActiverequiredRef<boolean>
- Reactive flag controlling overlay visibility. Strategies may set this to false to close the overlay on scroll.
- updateLocationrequiredRef<((e: Event) => void) | undefined>
- Callback provided by the positioning engine. The strategy calls it on scroll events to recompute the floating panel position.
Ecosystem
Used by
Components and composables that extend or consume this interface.
Usage
Examples
Ready-to-paste code snippets using this interface.
Writing a custom TScrollStrategyFn