File
Description
Directive toggling CSS class on any element when scrolling past a custom threshold.
More flexible alternative to euiScrollHandler with configurable element ID, class, and height.
Monitors window scroll and applies specified class when threshold exceeded.
Example :<div euiScrollHandlerElement="myNav"
toggleClass="nav-fixed"
[toggleActiveHeight]="100">
Navigation content
</div>
Accessibility
- Visual feedback for scroll position
- Does not affect keyboard navigation or screen readers
- Ensure element remains accessible in both states
Notes
- Element ID specified via euiScrollHandlerElement input
- CSS class specified via toggleClass input
- Scroll threshold specified via toggleActiveHeight input (in pixels)
- Class added when scroll position exceeds toggleActiveHeight
Index
Properties
|
|
|
Methods
|
|
|
Inputs
|
|
|
HostListeners
|
|
|
|
euiScrollHandlerElement
|
Type : string
|
|
toggleActiveHeight
|
Type : number
|
Methods
|
onWindowScroll
|
onWindowScroll()
|
Decorators :
@HostListener('window:scroll', undefined)
|
|
|
|
Public
navIsFixed
|
Type : unknown
|
Default value : false
|