Layout Blocks
Layout blocks take other blocks as parameters and lay them out. Interactive layout blocks (such as tabs and selects) don't require a backend server, which means they can be used in both Reports and Apps.
This includes columns:
Interactive tabs:
And many other supported layout blocks.
Nesting¶
Layout blocks can be arbitrarily nested, allowing you to create complex user interfaces.
dp.Group(
dp.Text("This is the left side of a two-column layout"),
dp.Group(
dp.Text("This is the right side of a two-column layout"),
dp.Text("Below we have three tabs with different content"),
dp.Select(
blocks=[
dp.Text("Hello World", label="Page 1"),
dp.Text("Hello World", label="Page 2"),
dp.Text("Hello World", label="Page 3"),
]
),
),
columns=2,
)