MCPcopy Create free account
hub / github.com/adobe/react-spectrum / LayoutInfo

Class LayoutInfo

packages/react-stately/src/virtualizer/LayoutInfo.ts:22–125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20 * The virtualizer uses this information when creating actual DOM elements to display.
21 */
22export class LayoutInfo {
23 /**
24 * The type of element represented by this LayoutInfo. Should match the `type` of the
25 * corresponding collection node.
26 */
27 type: string;
28
29 /**
30 * A unique key for this LayoutInfo. Should match the `key` of the corresponding collection node.
31 */
32 key: Key;
33
34 /**
35 * The key for a parent LayoutInfo, if any.
36 */
37 parentKey: Key | null;
38
39 /**
40 * Content for this item if it was generated by the layout rather than coming from the Collection.
41 */
42 content: any | null;
43
44 /**
45 * The rectangle describing the size and position of this element.
46 */
47 rect: Rect;
48
49 /**
50 * Whether the size is estimated. `false` by default.
51 * Items with estimated sizes will be measured the first time they are added to the DOM.
52 * The estimated size is used to calculate the size and position of the scrollbar.
53 *
54 * @default false
55 */
56 estimatedSize: boolean;
57
58 /**
59 * Whether the layout info sticks to the viewport when scrolling.
60 *
61 * @default false
62 */
63 isSticky: boolean;
64
65 /**
66 * The element's opacity.
67 *
68 * @default 1
69 */
70 opacity: number;
71
72 /**
73 * A CSS transform string to apply to the element. `null` by default.
74 */
75 transform: string | null;
76
77 /**
78 * The z-index of the element. 0 by default.
79 */

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected