Column
Lays out children in a column on top of each other, with the given gap between them.
@solara.component
def Column(children=[], gap="12px", align="stretch", margin: int = 0, classes: List[str] = [], style: Union[str, Dict[str, str], None] = None):
...
See also Row.
Example with three children on top of each other:
import solara
@solara.component
def Page():
with solara.Column(gap="10px"):
solara.Text("On top")
solara.Text("In the middle")
solara.Text("On bottom")
On topIn the middleOn bottom
Live output
Arguments
children
: List of children to render in the column.gap
: The gap between each child, as a CSS string.align
: The alignment of the children, can be "start", "center", "end", "stretch" (default). (Note: this translates to align-items in CSS).margin
: The margin around the column, translate to 4*margin pixels.classes
: List of CSS classes to apply to the column.style
: CSS style to apply to the column.
Example
Column demo
Align:
12px