ui.stack
Stack & flex
Rows and columns with a spacing scale — vstack and hstack for the everyday case, flex for the full axis API.A vertical list
ui.vstack puts its children one under the other, with a gap from the theme's spacing scale.A horizontal row
ui.hstack centres its children vertically by default — the usual intent for a row.Lena Park[email protected]
Distribute along the row
justify="start"
justify="center"
justify="end"
justify="between"
Let it wrap
wrap=True sends the overflow to the next line instead of squeezing the tags.PythonFastAPIPostgreSQLRedisTailwindHTMXDockerPlaywrightServer-sent events
A filter bar that shares the width
grow="16rem" gives each field a 16rem basis, then shares what is left; below that they wrap.Change direction with the window
ui.flex takes a breakpoint dict: a column on a phone, a row from md upwards.SidebarStacks on top on a phone.
Main contentTakes the remaining width once the window is wide enough for two columns.