Skip to content

packages/core/src/lib/hooks/use-layout-box.ts

Read as Markdown

This is the source snapshot used to build these API details. View this revision on GitHub.

Back to reference

1 import { getLayoutBox } from '../layout/context.js';
2 import type { LayoutBox } from '../layout/types.js';
3 
4 /**
5  * Returns the current stable child-local allocation without scheduling work.
6  *
7  * @returns The current parent-assigned layout box in logical coordinates. See {@link LayoutBox}.
8  *
9  * @see {@link LayoutBox}
10  */
11 export function useLayoutBox(): Readonly<LayoutBox> {
12   return getLayoutBox();
13 }
14 

Documentation built with @pibbl/core 0.0.2, revision 272a94a. ALPHA — NOT FOR PRODUCTION USE.