MasonryInfiniteGridOptions
Type: TSInterface
PROPERTY | TYPE | DEFAULT | DESCRIPTION |
---|---|---|---|
horizontal | boolean | false | Direction of the scroll movement. (true: horizontal, false: vertical) If horizontal is false, |
percentage | Array<"position" | "size"> | boolean | false | Whether to set the css size and position of the item to %. |
isEqualSize | boolean | false | Indicates whether sizes of all card elements are equal to one another. If sizes of card elements to be arranged are all equal and this option is set to "true", the performance of layout arrangement can be improved. |
isConstantSize | boolean | false | Indicates whether sizes of all card elements does not change, the performance of layout arrangement can be improved. |
gap | number | 5 | Gap used to create space around items. |
attributePrefix | string | "data-grid-" | The prefix to use element's data attribute. |
resizeDebounce | number | 100 | Debounce time to set in the resize event. (unit: ms) |
maxResizeDebounce | number | 0 | Maximum time to debounce the resize event. (0 is not set) |
autoResize | boolean | true | Whether the resize method should be called automatically after a window resize event. |
useFit | boolean | true | Whether to move the outline to 0 when the top is empty when rendering. However, if it overflows above the top, the outline is forced to 0. |
useTransform | boolean | false | Whether to use transform property instead of using left and top css properties. |
renderOnPropertyChange | boolean | true | Whether to automatically render through property change. |
preserveUIOnDestroy | boolean | false | Whether to preserve the UI of the existing container or item when destroying. |
defaultDirection | "start" | "end" | "end" | The default direction value when direction is not set in the render option. |
outlineLength | number | 0 | The number of outlines. If the number of outlines is 0, it is calculated according to the type of grid. |
outlineSize | number | 0 | The size of the outline. If the outline size is 0, it is calculated according to the grid type. |
useRoundedSize | boolean | true | Whether to get the size as rounded size(offsetWidth, offsetHeight). Set to true if transform is applied to the container. If false, get the size through getBoundingClientRect. |
useResizeObserver | boolean | false | Whether to use ResizeObserver event to detect container size change when |
observeChildren | boolean | false | Whether to detect size change of children if useResizeObserver option is used. |
externalItemRenderer | ItemRenderer | null | You can set the ItemRenderer directly externally. | |
externalContainerManager | ContainerManager | null | You can set the ContainerManager directly externally. | |
column | number | 0 | The number of columns. If the number of columns is 0, it is automatically calculated according to the size of the container. Can be used instead of outlineLength. |
columnSize | number | 0 | The size of the columns. If it is 0, it is calculated as the size of the first item in items. Can be used instead of outlineSize. |
columnSizeRatio | number | 0 | The size ratio(inlineSize / contentSize) of the columns. 0 is not set. |
align | GridAlign | "justify" | Align of the position of the items. If you want to use |
columnCalculationThreshold | number | 1 | Difference Threshold for Counting Columns. Since offsetSize is calculated by rounding, the number of columns may not be accurate. |
maxStretchColumnSize | number | Infinity | If stretch is used, the column can be automatically calculated by setting the maximum size of the column that can be stretched. |
horizontal | boolean | false | Direction of the scroll movement. (true: horizontal, false: vertical) If horizontal is false, |
percentage | Array<"position" | "size"> | boolean | false | Whether to set the css size and position of the item to %. |
isEqualSize | boolean | false | Indicates whether sizes of all card elements are equal to one another. If sizes of card elements to be arranged are all equal and this option is set to "true", the performance of layout arrangement can be improved. |
isConstantSize | boolean | false | Indicates whether sizes of all card elements does not change, the performance of layout arrangement can be improved. |
gap | number | 5 | Gap used to create space around items. |
attributePrefix | string | "data-grid-" | The prefix to use element's data attribute. |
resizeDebounce | number | 100 | Debounce time to set in the resize event. (unit: ms) |
maxResizeDebounce | number | 0 | Maximum time to debounce the resize event. (0 is not set) |
autoResize | boolean | true | Whether the resize method should be called automatically after a window resize event. |
useFit | boolean | true | Whether to move the outline to 0 when the top is empty when rendering. However, if it overflows above the top, the outline is forced to 0. |
useTransform | boolean | false | Whether to use transform property instead of using left and top css properties. |
renderOnPropertyChange | boolean | true | Whether to automatically render through property change. |
preserveUIOnDestroy | boolean | false | Whether to preserve the UI of the existing container or item when destroying. |
defaultDirection | "start" | "end" | "end" | The default direction value when direction is not set in the render option. |
outlineLength | number | 0 | The number of outlines. If the number of outlines is 0, it is calculated according to the type of grid. |
outlineSize | number | 0 | The size of the outline. If the outline size is 0, it is calculated according to the grid type. |
useRoundedSize | boolean | true | Whether to get the size as rounded size(offsetWidth, offsetHeight). Set to true if transform is applied to the container. If false, get the size through getBoundingClientRect. |
useResizeObserver | boolean | false | Whether to use ResizeObserver event to detect container size change when |
observeChildren | boolean | false | Whether to detect size change of children if useResizeObserver option is used. |
externalItemRenderer | ItemRenderer | null | You can set the ItemRenderer directly externally. | |
externalContainerManager | ContainerManager | null | You can set the ContainerManager directly externally. | |
container | boolean | HTMLElement | string | Ref<HTMLElement> | false | The target to which the container is applied. If false, create itself, if true, create container. A string or HTMLElement specifies the target directly. |
containerTag | string | "div" | If you create a container, you can set the container's tag. |
threshold | number | 100 | The size of the scrollable area for adding the next group of items. |
useRecycle | boolean | true | Whether to show only the DOM of the visible area. |
scrollContainer | HTMLElement | string | Ref<HTMLElement> | null | You can set the scrollContainer directly. In this case, the container becomes the wrapper itself. | |
gridConstructor | GridFunction | Grid class to apply Infinite function. | |
renderer | Renderer | null | class that renders the DOM. |