TeachingTip
A Fluent teaching tip: a callout that points at content to tell
the user about a feature, opened and closed with open.
Example:
tip = fluent.TeachingTip(
content=fluent.Button("Save"),
title="Save automatically",
subtitle="Changes are saved as you type, so you can close this page "
"at any time.",
open=True,
)

Inherits: LayoutControl
Properties
buttons- Buttons shown in a row at the bottom of the tip, sharing its width.content- The control the tip points at.dismissible- Whether clicking outside the tip, or pressing Escape, closes it.leading- An icon or control shown beforetitle.media- An image or other control shown at the edge of the tip, opposite the control it points at.open- Whether the tip is shown.placement- Where the tip opens relative tocontent.show_close_button- Whether the tip has a close button in its corner.subtitle- The text of the tip, belowtitle.title- The title of the tip, shown in bold.
Events
on_dismiss- Called when the tip is closed other than by settingopentoFalse: by the user, or by resizing the window.
Example
Fluent TeachingTip
import flet_fluent_ui as fluent
import flet as ft
def main(page: ft.Page):
page.title = "Fluent TeachingTip"
def show_tip(e: ft.Event[fluent.HyperlinkButton]):
tip.open = True
def close_tip(e: ft.Event[fluent.FilledButton]):
tip.open = False
tip = fluent.TeachingTip(
content=fluent.Button("Save"),
title="Save your work",
subtitle="Your changes are kept on this device until you save them.",
leading=fluent.FluentIcons.LIGHTBULB,
placement=fluent.FlyoutPlacementMode.BOTTOM_LEFT,
buttons=[fluent.FilledButton("Got it", on_click=close_tip)],
)
page.add(
ft.SafeArea(
content=ft.Row(
controls=[
tip,
fluent.HyperlinkButton("What's new?", on_click=show_tip),
]
)
)
)
if __name__ == "__main__":
ft.run(main)

Properties
buttonsclass-attributeinstance-attribute
buttons: list[Control] = field(default_factory=list)Buttons shown in a row at the bottom of the tip, sharing its width.
dismissibleclass-attributeinstance-attribute
dismissible: bool = TrueWhether clicking outside the tip, or pressing Escape, closes it.
leadingclass-attributeinstance-attribute
leading: IconDataOrControl | None = NoneAn icon or control shown before title.
mediaclass-attributeinstance-attribute
media: Control | None = NoneAn image or other control shown at the edge of the tip, opposite the control it points at.
It is not shown when the tip has buttons.
openclass-attributeinstance-attribute
open: bool = FalseWhether the tip is shown.
Resizing the window closes the tip, which calls on_dismiss.
placementclass-attributeinstance-attribute
placement: FlyoutPlacementMode = FlyoutPlacementMode.AUTOWhere the tip opens relative to content.
show_close_buttonclass-attributeinstance-attribute
show_close_button: bool = TrueWhether the tip has a close button in its corner.
subtitleclass-attributeinstance-attribute
subtitle: StrOrControl | None = NoneThe text of the tip, below title.
Events
on_dismissclass-attributeinstance-attribute
on_dismiss: ControlEventHandler[TeachingTip] | None = (
None
)Called when the tip is closed other than by setting open to
False: by the user, or by resizing the window.
open is set to False before this is called.