<sessions-stack>
A column (or row) of children with even spacing.
Preact & React
<Stack>GroupLayoutDrawn asStackPreview
Drawn by the same renderers Sessions uses for your extension, from the DOM example beside it, without its event handlers.
When to use it
The workhorse layout. Stacks its children top-to-bottom by default; direction="inline" lays them out left-to-right and wraps.
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
directionWhich way children flow.
blockinlineProp directiongapSpace between children.
nonesmallbaselargeProp gapalignCross-axis alignment of children.
startcenterendstretchProp alignExample
import {Stack, Text} from '@sessions/apps/preact';
<Stack gap="small">
<Text emphasis="strong">Doors open at 6:30</Text>
<Text emphasis="subdued">Arrive early for a good seat.</Text>
</Stack>