The Switcher

The switcher can be used to have a section where boxes will be stacked side by side until the screen reaches a point where their minimum width would be reached, then the whole thing turns into a vertical stack of the same width.

You can use the props classes, threshold and gap to add classes, give the minimum size and add a gutter between items. For the items themselves, add a class or style of flex-gap: 2;, for example, to have that item be twice as wide as the others


A switcher

Here the middle item is made twice as large as the others by adding flex-grow: 2; as a style attribute.

one

two

tre


A switcher with max-4 class

This will always be vertical as it has five items. Try removing one in devtools.

You can change the maximum number by changing the maxItems prop. You can go up to 10 items, any more and maybe you need a different layout.

one

two

tre

for

fyv