<sessions-grid>
Equal columns that stack on a narrow container.
Preact & React
<Grid>GroupLayoutDrawn asGridPreview
Drawn by the same renderers Sessions uses for your extension, from the DOM example beside it, without its event handlers.
When to use it
A grid of 2, 3 or 4 columns. Set min-column-width instead to fit as many columns as the space allows and collapse to one column on a phone.
In Preact and React, import the component of the same name from @sessions/apps/preact or @sessions/apps/react. Attributes become camelCase props, a boolean attribute is a boolean prop, and an event is an on prop that receives the event’s detail.
Attributes
Attribute
columnsA fixed number of columns.
234Prop columnsgapSpace between children.
nonesmallbaselargeProp gapmin-column-widthA CSS length; when set, the grid fits as many columns as will fit.Prop
minColumnWidthExample
import {Grid, Text} from '@sessions/apps/preact';
<Grid minColumnWidth="12rem" gap="base">
<Text>Warm-up · 10 min</Text>
<Text>Main set · 40 min</Text>
<Text>Cool-down · 10 min</Text>
</Grid>