IScrollProps
interface
Scroll
Scroll-aware behaviour props for AppBar and similar layout components. Declares the scroll target, threshold and a space-separated list of behaviours (hide, collapse, elevate, fade-image, inverted).
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.
- scrollBehaviorTScrollBehavior | TAnyString
- Space-separated list of scroll behaviours, e.g. "hide inverted" or "elevate active". The inverted modifier flips the trigger direction for hide / collapse / elevate and does nothing on its own.
- scrollTargetstring
- CSS selector or element ID of the scroll container to observe. Defaults to the nearest scrollable ancestor when omitted.
- scrollThresholdstring | number
- Scroll distance (in pixels) the target must travel before the behaviour activates. Accepts a number or a CSS length string.
Ecosystem
Used by
Components and composables that extend or consume this interface.
Usage
Examples
Ready-to-paste code snippets using this interface.
AppBar hiding on scroll with a threshold