TScrollStrategy

type
Navigation

Behaviour of a floating element (Overlay, Dialog, Tooltip, Menu) when the user scrolls the page while it is open — none, close, block or reposition.

TypeScript

Definition

The TypeScript definition as found in the origam source. Click the copy icon to copy the snippet.

typescript

Accepted

Values

Accepted string literal values for this type. Click a value to copy it.

none
Scroll events have no effect — the overlay stays open and in place regardless of page scroll.
block
Page scroll is prevented while the overlay is open — used by modal dialogs and full-screen drawers.
close
Scrolling closes the overlay immediately — used by menus and tooltips where stale positioning would confuse the user.
reposition
The overlay repositions itself to stay anchored to its activator as the page scrolls — used by anchored menus and select dropdowns.

Ecosystem

Used by

Components and props that accept this type as a value.

Usage

Examples

Ready-to-paste code snippets using this type.

Dialog blocking page scroll while open

html

Menu that repositions when the page scrolls

html