Layout Tree Structure#

Book(
    Sheet(
        # Structured container: Frame, Col/Row, Cell
        Frame(
            Col(
                Cell(1),
                Cell(2),
                Cell(3),
                Cell(4),
            ),
            Col(
                Cell(1),
                Cell(2),
                Cell(3),
                Cell(4),
            ),
        ),
        # Unstructured container: Stack, Sheet
        Stack(
            Cell(1),
            Row(1, 2, 3),
            Col(5, 6, 7),
            Frame([[10,20], [30, 40]]),
        )
    )
).write(path)

1D Vector#

A series header attribute is special, and doesn’t act like a normal cell. Read more about headers

2D Vector#

Unstructured Container#

Stacks can hold anything, just like an html <div>, but they can’t be used in expressions. They offer unique styling features not available to other elements, like margin and padding

Worksheet#

Sheets handle children just like VStack.