Skip to main content

Example

Basic tooltip exampleBasic tooltip example

Basic tooltip with a button as a trigger.

Properties

Required

String
required
The text label to display in the tooltip.
Widget
required
The widget that triggers the tooltip on .

Layout

NeoTooltipPosition
default:".top"
The position where the tooltip appears relative to the child widget.
NeoPopoverAlign
default:".center"
Cross-axis alignment relative to the child. For top / bottom, this is horizontal (start / end follow text direction). For left / right, this is vertical (start = top, end = bottom).

Behavior

Duration
default:"Duration(seconds: 1)"
The delay before showing the tooltip on hover. Does not affect long press behavior on mobile.

Enums

NeoTooltipPosition

Position where the tooltip appears relative to the child widget.
  • top: Tooltip appears above the child
  • right: Tooltip appears to the right of the child
  • bottom: Tooltip appears below the child
  • left: Tooltip appears to the left of the child

NeoPopoverAlign

Cross-axis alignment of the tooltip relative to the child.
  • start: Align to the start edge (leading / top depending on position)
  • center: Center on the cross axis (default)
  • end: Align to the end edge (trailing / bottom depending on position)

Best Practices

  • Accessibility: Tooltips are essential for icon-only buttons and helpful for providing additional context.

Integration Notes

  • Interaction Methods:
    • Desktop: Hover to show tooltip after the specified delay
    • Mobile: Long press to show tooltip immediately
  • Dismissal: Tooltips automatically hide when:
    • Mouse leaves the child area (desktop)
    • User taps outside the tooltip (mobile, after long press)
    • User performs other interactions
Last modified on August 10, 2026