UNPKG

@dnd-kit/core

Version:

dnd kit – a lightweight React library for building performant and accessible drag and drop experiences

26 lines (25 loc) 721 B
import type { ClientRect } from '../../types'; interface Options { ignoreTransform?: boolean; } /** * Returns the bounding client rect of an element relative to the viewport. */ export declare function getClientRect(element: Element, options?: Options): { top: number; left: number; width: number; height: number; bottom: number; right: number; }; /** * Returns the bounding client rect of an element relative to the viewport. * * @remarks * The ClientRect returned by this method does not take into account transforms * applied to the element it measures. * */ export declare function getTransformAgnosticClientRect(element: Element): ClientRect; export {};