TooltipState

The state that controls the visibility of a TooltipBox.

Created via rememberTooltipState. When isPersistent is false the tooltip is dismissed automatically after a short timeout; when true it stays visible until dismiss is called or the user taps outside. A global MutatorMutex keeps only one tooltip visible at a time.

Properties

Link copied to clipboard
abstract val isPersistent: Boolean

Whether the tooltip stays visible until explicitly dismissed.

Link copied to clipboard
abstract val isVisible: Boolean

Whether the tooltip is currently visible (including while animating out).

Link copied to clipboard

The transition driving the tooltip's enter / exit animation.

Functions

Link copied to clipboard
abstract fun dismiss()

Dismisses the tooltip.

Link copied to clipboard
abstract fun onDispose()

Cleans up the coroutine backing show when the tooltip leaves the composition.

Link copied to clipboard
abstract suspend fun show(mutatePriority: MutatePriority = MutatePriority.Default)

Shows the tooltip, suspending until it is dismissed or superseded by another tooltip.