packages/components/directives/eui-scroll-handler.directive.ts
Directive toggling CSS class on app header when scrolling past a threshold. Monitors window scroll position and adds 'shrink-header-active' class to app wrapper. Requires specific DOM structure with 'app-wrapper' and 'app-header' element IDs. Typically used for sticky headers that shrink or change appearance on scroll.
Example :<div id="app-wrapper">
<header id="app-header">Header content</header>
<main [euiScrollHandler]="true">Main content</main>
</div>
| Selector | [euiScrollHandler] |
Properties |
Methods |
Inputs |
HostListeners |
| euiScrollHandler |
Type : boolean
|
Default value : false
|
| window:scroll |
| onWindowScroll |
onWindowScroll()
|
Decorators :
@HostListener('window:scroll', undefined)
|
|
Returns :
void
|
| appHeaderHeight |
Type : number
|
Default value : 0
|
| navIsFixed |
Type : unknown
|
Default value : false
|