Pages

Switcher and row

Side by side until the container is narrower than --threshold, then stacked; or equal columns in a row.

Examples

Switcher

one
two
three

Row

one
two

Anatomy

.switcherWrapping flex row. Its children share the width equally until the switcher is narrower than --threshold, then each takes a full row. All switch at once, never two-and-one.
.rowOne row of equal columns, however many children. Stacks under a 48rem viewport.

API

AttributeValuesDescription
--thresholdon .switcher<length>Container width below which the children stack. Default φ^7.5 ≈ 37rem.

Accessibility

  • Switching only changes the layout: the children keep their source order when they stack, so write them in reading order.
  • The switcher responds to its own width, not the viewport's, so it also stacks when zoomed text makes the container narrow.
Jump to
ProportionFoundations
MaterialFoundations
PresetsFoundations
ShellLayouts · Application
Container and stacksLayouts · Pages
SplitLayouts · Pages
Grid, bento, masonryLayouts · Pages
Switcher and rowLayouts · Pages
↑↓Move↵OpenescClose