@zag-js/dom-query
Version:
The dom helper library for zag.js machines
17 lines (15 loc) • 708 B
text/typescript
interface ScrollOptions extends ScrollIntoViewOptions {
rootEl: HTMLElement | null;
}
interface ScrollToElementOptions {
rootEl: HTMLElement | null;
behavior?: ScrollBehavior | undefined;
}
declare function scrollIntoView(el: HTMLElement | null | undefined, options?: ScrollOptions): void;
declare function scrollToElement(el: HTMLElement | null | undefined, options?: ScrollToElementOptions): boolean;
interface ScrollPosition {
scrollLeft: number;
scrollTop: number;
}
declare function getScrollPosition(element: HTMLElement | Window): ScrollPosition;
export { type ScrollOptions, type ScrollPosition, type ScrollToElementOptions, getScrollPosition, scrollIntoView, scrollToElement };