Skip to content

Tooltip

Shows a hint below child while keyboard focus is anywhere inside it.

See also: Anchored to float any content next to a trigger.

Import: package:fleury/fleury.dart, or package:fleury/fleury_core.dart in browser code.

Tooltip(
message: 'Saves the current file',
child: Button(text: 'Save', autofocus: true, onPressed: () {}),
)

Focus is the trigger, not the mouse: Tab onto the wrapped widget (or any focusable widget inside it) and message appears in a framed box just below it, or above it when there isn’t room; move focus away and it disappears. Escape hides it until focus leaves and returns. Wrap a button or a field and it works without setup. Clicks elsewhere in the app still work while the hint is showing.

ParameterTypeDefaultDescription
message:StringrequiredHint text shown while focus is within child, unless the user dismisses it with Escape. Leaving and re-entering the child restores the hint.
semanticLabel:String'Tooltip'Label exposed through the semantic app graph.
child:WidgetrequiredWidget whose descendant focus controls tooltip visibility.

Tooltip is defined in packages/fleury/lib/src/catalog/tooltip.dart.

Category: Navigation & overlays · All widgets