Skip to main content

Tooltip

Shows a Fluent tooltip with a message when the pointer hovers over its content, or when it is long-pressed.

Example:

fluent.Tooltip(
message="Save the document",
content=fluent.IconButton(fluent.FluentIcons.SAVE),
)
Tooltip
Tooltip

Inherits: LayoutControl

Properties

  • content - The control that shows the tooltip.
  • message - The text of the tooltip.
  • show_below - Whether the tooltip is shown below content instead of above it, when there is room.
  • show_duration - How long the tooltip stays visible after the pointer leaves or the long-press ends.
  • wait_duration - How long the pointer must hover before the tooltip is shown.

Example​

Fluent Tooltip​

Sourceplay_arrowTry Online
import flet_fluent_ui as fluent

import flet as ft


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

page.add(
ft.SafeArea(
content=ft.Row(
controls=[
fluent.Tooltip(
message="Save the document",
content=fluent.IconButton(fluent.FluentIcons.SAVE),
),
fluent.Tooltip(
message="Print the document",
content=fluent.IconButton(fluent.FluentIcons.PRINT),
),
],
)
)
)


if __name__ == "__main__":
ft.run(main)
tooltip
Hovering the save button

Properties​

contentinstance-attribute​

content: Control

The control that shows the tooltip.

messageinstance-attribute​

message: str

The text of the tooltip.

show_belowclass-attributeinstance-attribute​

show_below: bool = True

Whether the tooltip is shown below content instead of above it, when there is room.

show_durationclass-attributeinstance-attribute​

show_duration: DurationValue | None = None

How long the tooltip stays visible after the pointer leaves or the long-press ends.

If None, the theme's default is used.

wait_durationclass-attributeinstance-attribute​

wait_duration: DurationValue | None = None

How long the pointer must hover before the tooltip is shown.

If None, the theme's default is used.