Stack
stack · Layout · All components
Flex container. The main layout primitive (rows, columns, sidebars, toolbars).

board
screen custom width=560 height=300 padding=0
stack row grow
stack width=160 border=right fill padding=16 gap=12
text "Sidebar" bold
text "width, border, fill" sm muted
stack grow padding=16 gap=16
stack row justify=between align=center
heading "Toolbar" level=3
stack row gap=8
button secondary sm "Filter"
button primary sm "New"
stack row wrap gap=8
badge outline "row"
badge outline "wrap"
badge outline "gap"
text lines=3Writing it
- Bare words set direction:
row,column. - Bare words set align:
stretch. - Bare words set justify:
between,around. - Bare words set border:
none,right,left,top,bottom,all. start,center,endare options of align and justify, so write which one you mean:align=startorjustify=start.wrapturns wrap on;no-wrapturns it off.growturns grow on;no-growturns it off.fillturns fill on;no-fillturns it off.- Anything else is written
key=value. - Holds other elements: indent them two spaces below it.
Props
| Prop | Values | Notes |
|---|---|---|
direction |
row, column | |
gap |
number | |
padding |
number | |
align |
start, center, end, stretch | |
justify |
start, center, end, between, around | |
wrap |
boolean | |
grow |
boolean | Fill remaining space in the parent |
width |
number, string | Fixed width, e.g. 240 for a sidebar |
border |
none, right, left, top, bottom, all | |
fill |
boolean | Light gray background |
tsquare 0.9.0 · View this page on GitHub
tsquare