Column
Arranges child controls vertically, optionally aligning and spacing them within the available space.
ft.Column(
width=220,
height=120,
spacing=12,
controls=[
ft.Text("Daily planning", size=20, weight=ft.FontWeight.W_600),
ft.Text("Review pull requests"),
ft.Text("Ship release"),
],
)

Inherits: LayoutControl, ScrollableControl, AdaptiveControl
Properties
alignment- How the child Controls should be placed vertically.controls- A list of controls to display.horizontal_alignment- Defines how thecontrolsshould be placed horizontally.intrinsic_width- IfTrue, the Column will be as wide as the widest child control.run_alignment- How the runs should be placed in the cross-axis whenwrapisTrue.run_spacing- The spacing between runs whenwrapisTrue.spacing- Spacing between thecontrols.tight- Determines how vertical space is allocated.wrap- Whether thecontrolsshould wrap into additional columns (runs) when they don't fit in a single vertical column.
Examples
Column spacing
import flet as ft
def main(page: ft.Page):
def generate_items(count: int):
"""Generates a list of custom Containers with length `count`."""
return [
ft.Container(
content=ft.Text(value=str(i)),
alignment=ft.Alignment.CENTER,
width=50,
height=50,
bgcolor=ft.Colors.AMBER,
border_radius=ft.BorderRadius.all(5),
)
for i in range(1, count + 1)
]
def handle_slider_change(e: ft.Event[ft.Slider]):
"""Updates the spacing between items based on slider value."""
column.spacing = int(e.control.value)
column.update()
page.add(
ft.SafeArea(
content=ft.Column(
controls=[
ft.Column(
controls=[
ft.Text("Spacing between items"),
ft.Slider(
min=0,
max=100,
divisions=10,
value=0,
label="{value}",
width=500,
on_change=handle_slider_change,
),
]
),
column := ft.Column(spacing=0, controls=generate_items(5)),
]
)
),
)
if __name__ == "__main__":
ft.run(main)

Column wrapping
import flet as ft
HEIGHT = 400
def main(page: ft.Page):
def items(count: int):
return [
ft.Container(
content=ft.Text(value=str(i)),
alignment=ft.Alignment.CENTER,
width=30,
height=30,
bgcolor=ft.Colors.AMBER,
border_radius=ft.BorderRadius.all(5),
)
for i in range(1, count + 1)
]
def handle_slider_change(e: ft.Event[ft.Slider]):
col.height = float(e.control.value)
col.update()
page.add(
ft.SafeArea(
content=ft.Column(
controls=[
ft.Column(
controls=[
ft.Text(
"Change the column height to see how child items "
"wrap onto multiple columns:"
),
ft.Slider(
min=0,
max=HEIGHT,
divisions=20,
value=HEIGHT,
label="{value}",
width=500,
on_change=handle_slider_change,
),
]
),
ft.Container(
bgcolor=ft.Colors.TRANSPARENT,
content=(
col := ft.Column(
wrap=True,
spacing=10,
run_spacing=10,
controls=items(10),
height=HEIGHT,
)
),
),
]
)
),
)
if __name__ == "__main__":
ft.run(main)

Column vertical alignments
import flet as ft
@ft.control
class ColumnFromVerticalAlignment(ft.Column):
alignment: ft.MainAxisAlignment = ft.MainAxisAlignment.START
def init(self):
self.controls = [
ft.Text(str(self.alignment), size=10),
ft.Container(
content=ft.Column(self.generate_items(3), alignment=self.alignment),
bgcolor=ft.Colors.AMBER_100,
height=400,
),
]
@staticmethod
def generate_items(count: int):
"""Generates a list of custom Containers with length `count`."""
return [
ft.Container(
content=ft.Text(value=str(i)),
alignment=ft.Alignment.CENTER,
width=50,
height=50,
bgcolor=ft.Colors.AMBER_500,
)
for i in range(1, count + 1)
]
def main(page: ft.Page):
page.add(
ft.SafeArea(
content=ft.Row(
spacing=30,
alignment=ft.MainAxisAlignment.START,
scroll=ft.ScrollMode.AUTO,
controls=[
ColumnFromVerticalAlignment(alignment=ft.MainAxisAlignment.START),
ColumnFromVerticalAlignment(alignment=ft.MainAxisAlignment.CENTER),
ColumnFromVerticalAlignment(alignment=ft.MainAxisAlignment.END),
ColumnFromVerticalAlignment(
alignment=ft.MainAxisAlignment.SPACE_BETWEEN
),
ColumnFromVerticalAlignment(
alignment=ft.MainAxisAlignment.SPACE_AROUND
),
ColumnFromVerticalAlignment(
alignment=ft.MainAxisAlignment.SPACE_EVENLY
),
],
)
)
)
if __name__ == "__main__":
ft.run(main)

Column horizontal alignments
import flet as ft
@ft.control
class ColumnFromHorizontalAlignment(ft.Column):
alignment: ft.CrossAxisAlignment = ft.CrossAxisAlignment.START
def init(self):
self.controls = [
ft.Text(str(self.alignment), size=16),
ft.Container(
bgcolor=ft.Colors.AMBER_100,
width=100,
content=ft.Column(
controls=self.generate_items(3),
alignment=ft.MainAxisAlignment.START,
horizontal_alignment=self.alignment,
),
),
]
@staticmethod
def generate_items(count: int):
"""Generates a list of custom Containers with length `count`."""
return [
ft.Container(
content=ft.Text(value=str(i)),
alignment=ft.Alignment.CENTER,
width=50,
height=50,
bgcolor=ft.Colors.AMBER_500,
)
for i in range(1, count + 1)
]
def main(page: ft.Page):
page.add(
ft.SafeArea(
content=ft.Row(
spacing=30,
alignment=ft.MainAxisAlignment.START,
controls=[
ColumnFromHorizontalAlignment(
alignment=ft.CrossAxisAlignment.START
),
ColumnFromHorizontalAlignment(
alignment=ft.CrossAxisAlignment.CENTER
),
ColumnFromHorizontalAlignment(alignment=ft.CrossAxisAlignment.END),
],
)
)
)
if __name__ == "__main__":
ft.run(main)
