Skip to main content
Version: Next

JustifiedInfiniteGridOptions

Type: TSInterface

PROPERTYTYPEDEFAULTDESCRIPTION
horizontalbooleanfalse

Direction of the scroll movement. (true: horizontal, false: vertical) If horizontal is false, inlinePos is left, inlineSize is width, contentPos is top, and contentSize is height. If horizontal is true, inlinePos is top, inlineSize is height, contentPos is left, and contentSize is width.

percentageArray<"position" | "size"> | booleanfalse

Whether to set the css size and position of the item to %.

isEqualSizebooleanfalse

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.

isConstantSizebooleanfalse

Indicates whether sizes of all card elements does not change, the performance of layout arrangement can be improved.

gapnumber | {horizontal?: number, vertical?: number}5

Gap used to create space around items.

attributePrefixstring"data-grid-"

The prefix to use element's data attribute.

resizeDebouncenumber100

Debounce time to set in the resize event. (unit: ms)

maxResizeDebouncenumber0

Maximum time to debounce the resize event. (0 is not set)

autoResizebooleantrue

Whether the resize method should be called automatically after a window resize event.

useFitbooleantrue

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.

useTransformbooleanfalse

Whether to use transform property instead of using left and top css properties.

renderOnPropertyChangebooleantrue

Whether to automatically render through property change.

preserveUIOnDestroybooleanfalse

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.

outlineLengthnumber0

The number of outlines. If the number of outlines is 0, it is calculated according to the type of grid.

outlineSizenumber0

The size of the outline. If the outline size is 0, it is calculated according to the grid type.

useRoundedSizebooleantrue

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.

useResizeObserverbooleanfalse

Whether to use ResizeObserver event to detect container size change when autoResize option is used.

observeChildrenbooleanfalse

Whether to detect size change of children if useResizeObserver option is used.

externalItemRendererItemRenderer | null

You can set the ItemRenderer directly externally.

externalContainerManagerContainerManager | null

You can set the ContainerManager directly externally.

columnRangenumber | number[][1, 8]

The minimum and maximum number of items per line.

rowRangenumber | number[]0

The minimum and maximum number of rows in a group, 0 is not set.

sizeRangenumber | number[][0, Infinity]

The minimum and maximum size by which the item is adjusted. If it is not calculated, it may deviate from the minimum and maximum sizes.

displayedRownumber-1

Maximum number of rows to be counted for container size. You can hide it on the screen by setting overflow: hidden. -1 is not set.

isCroppedSizebooleanfalse

Whether to crop when the row size is out of sizeRange. If set to true, this ratio can be broken.

inlineOffsetnumber0

The ratio is maintained except for the offset value in the inline direction. If 'data-grid-inline-offset' is set in the element of each item, it will be applied first.

contentOffsetnumber0

The ratio is maintained except for the offset value in the content direction. If 'data-grid-content-offset' is set in the element or JSX of each item, it will be applied first.

stretchbooleanfalse

it is possible to basically break the proportion of the item and stretch the inline size to fill the container.
If you set the sizeRange range narrowly, you can stretch well.

stretchRangeArray<string | number>["-10%", "+10%"]

If -, +, or % are added as a string value, it is a relative value to the original size. If it is a number value, the stretch range can be set as an absolute value.
If data-grid-min-stretch and data-grid-max-stretch are set in the Element or JSX of each item, they will be applied first.

@

passUnstretchRowboolean

Items placed in the last row are not stretched and are drawn maintaining their proportions. When using InfiniteGrid, it is calculated and re-rendered as follows:

horizontalbooleanfalse

Direction of the scroll movement. (true: horizontal, false: vertical) If horizontal is false, inlinePos is left, inlineSize is width, contentPos is top, and contentSize is height. If horizontal is true, inlinePos is top, inlineSize is height, contentPos is left, and contentSize is width.

percentageArray<"position" | "size"> | booleanfalse

Whether to set the css size and position of the item to %.

isEqualSizebooleanfalse

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.

isConstantSizebooleanfalse

Indicates whether sizes of all card elements does not change, the performance of layout arrangement can be improved.

gapnumber | {horizontal?: number, vertical?: number}5

Gap used to create space around items.

attributePrefixstring"data-grid-"

The prefix to use element's data attribute.

resizeDebouncenumber100

Debounce time to set in the resize event. (unit: ms)

maxResizeDebouncenumber0

Maximum time to debounce the resize event. (0 is not set)

autoResizebooleantrue

Whether the resize method should be called automatically after a window resize event.

useFitbooleantrue

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.

useTransformbooleanfalse

Whether to use transform property instead of using left and top css properties.

renderOnPropertyChangebooleantrue

Whether to automatically render through property change.

preserveUIOnDestroybooleanfalse

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.

outlineLengthnumber0

The number of outlines. If the number of outlines is 0, it is calculated according to the type of grid.

outlineSizenumber0

The size of the outline. If the outline size is 0, it is calculated according to the grid type.

useRoundedSizebooleantrue

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.

useResizeObserverbooleanfalse

Whether to use ResizeObserver event to detect container size change when autoResize option is used.

observeChildrenbooleanfalse

Whether to detect size change of children if useResizeObserver option is used.

externalItemRendererItemRenderer | null

You can set the ItemRenderer directly externally.

externalContainerManagerContainerManager | null

You can set the ContainerManager directly externally.

containerboolean | 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.

containerTagstring"div"

If you create a container, you can set the container's tag.

thresholdnumber100

The size of the scrollable area for adding the next group of items.

useRecyclebooleantrue

Whether to show only the DOM of the visible area.

scrollContainerHTMLElement | string | Ref<HTMLElement> | null

You can set the scrollContainer directly. In this case, the container becomes the wrapper itself.

gridConstructorGridFunction

Grid class to apply Infinite function.

appliedItemChecker(item: InfiniteGridItem, grid: Grid) => boolean

A function that checks whether non-rendering items are included in the Grid.

rendererRenderer | null

class that renders the DOM.