package.src.overflow-controller.d.ts Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of component-base Show documentation
Show all versions of component-base Show documentation
Vaadin component base mixins
/**
* @license
* Copyright (c) 2021 - 2024 Vaadin Ltd.
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
*/
import type { ReactiveController } from 'lit';
/**
* A controller that detects if content inside the element overflows its scrolling viewport,
* and sets the `overflow` attribute on the host with a value that indicates the directions
* where content is overflowing. Supported values are: `top`, `bottom`, `start`, `end`.
*/
export class OverflowController implements ReactiveController {
/**
* The controller host element.
*/
host: HTMLElement;
/**
* The element that wraps scrollable content.
* If not set, the host element is used.
*/
scrollTarget: HTMLElement;
constructor(host: HTMLElement, scrollTarget?: HTMLElement);
hostConnected(): void;
/**
* Setup a scroll listener and observers to update overflow.
* Also performs one-time update synchronously when called.
*/
protected observe(): void;
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy