closeScrollStrategy

Commons
stable

A scroll strategy that automatically closes an overlay (sets isActive to false) whenever a scroll event is detected on the target or content element. Used by OrigamMenu and similar floating components.

API

Signature

Full TypeScript signature sourced from the util file.

typescript

API

Parameters

Input parameters accepted by this util.

data
required
IScrollStrategyData
The scroll strategy data object provided by the overlay infrastructure, containing refs to the content element, target element, and the isActive toggle.

API

Return value

The value returned by this util.

Returns nothing. Registers a scroll listener that closes the overlay when triggered.

Usage

Examples

Ready-to-paste usage snippets.

Used via the scrollStrategy prop

html