Placeholder
A placeholder box.
ft.Placeholder(
expand=True,
color=ft.Colors.RED_500,
)

Inherits: LayoutControl
Properties
color- The color of the placeholder box.content- An optionalControlto display inside the placeholder.fallback_height- The height to use when the placeholder is in a situation with an unbounded height.fallback_width- The width to use when the placeholder is in a situation with an unbounded width.stroke_width- The width of the lines in the placeholder box.
Examples
Basic Example
import flet as ft
def main(page: ft.Page):
page.add(
ft.SafeArea(
expand=True,
content=ft.Placeholder(
expand=True,
color=ft.Colors.GREEN_ACCENT,
fallback_height=200,
fallback_width=300,
stroke_width=20,
),
)
)
if __name__ == "__main__":
ft.run(main)

Properties
colorclass-attributeinstance-attribute
color: ColorValue = Colors.BLUE_GREY_700The color of the placeholder box.
contentclass-attributeinstance-attribute
content: Optional[Control] = NoneAn optional Control to display inside the placeholder.
fallback_heightclass-attributeinstance-attribute
fallback_height: Number = 400.0The height to use when the placeholder is in a situation with an unbounded height.