Custom Dynamic Columns

By default, the Gallery chooses the amount of columns per row, based on the width of itself. The default columns are:

columns = 1;
if (containerWidth >= 500) columns = 2;
if (containerWidth >= 900) columns = 3;
if (containerWidth >= 1500) columns = 4;

If you'd like to change the columns based on the container size of your choosing try using react-measure to measure the size of your container. Resize the browser to see this in action. See example:

results matching ""

    No results matching ""