Skip to main content

Divider

A Fluent divider: a thin line that separates content.

Example:

ft.Column([ft.Text("Above"), fluent.Divider(), ft.Text("Below")])
Divider
Divider

Inherits: LayoutControl

Properties

  • color - The color of the line.
  • size - The length of the line.
  • thickness - The thickness of the line.
  • vertical - Whether the line is vertical, for separating controls in a row.

Example​

Fluent Divider​

Sourceplay_arrowTry Online
import flet_fluent_ui as fluent

import flet as ft


def main(page: ft.Page):
page.title = "Fluent Divider"

page.add(
ft.SafeArea(
content=ft.Column(
width=320,
controls=[
ft.Text("Account", weight=ft.FontWeight.W_600),
ft.Text("Signed in as jane@example.com"),
fluent.Divider(),
ft.Text("Storage", weight=ft.FontWeight.W_600),
ft.Text("120 GB of 256 GB used"),
fluent.Divider(),
ft.Row(
controls=[
ft.Text("Help"),
fluent.Divider(vertical=True, size=16),
ft.Text("Privacy"),
fluent.Divider(vertical=True, size=16),
ft.Text("Terms"),
],
),
],
)
)
)


if __name__ == "__main__":
ft.run(main)
divider
Sections separated by dividers

Properties​

colorclass-attributeinstance-attribute​

color: ColorValue | None = None

The color of the line.

If None, the theme's divider color is used.

sizeclass-attributeinstance-attribute​

size: Number | None = None

The length of the line.

If None, the line fills the available width (or height, when vertical).

The theme adds a 10 pixel margin at each end of the line, so a vertical divider in a row is 20 pixels taller than size.

thicknessclass-attributeinstance-attribute​

thickness: Number | None = None

The thickness of the line.

If None, the theme's divider thickness (1) is used.

verticalclass-attributeinstance-attribute​

vertical: bool = False

Whether the line is vertical, for separating controls in a row.