rememberTooltipState

@Composable
fun rememberTooltipState(initialIsVisible: Boolean = false, isPersistent: Boolean = false, mutatorMutex: MutatorMutex = BasicTooltipDefaults.GlobalMutatorMutex): TooltipState

Create and remember the default TooltipState for TooltipBox.

Parameters

initialIsVisible

the initial value for the tooltip's visibility when drawn.

isPersistent

Boolean that determines if the tooltip associated with this will be persistent or not. If isPersistent is true, then the tooltip will only be dismissed when the user clicks outside the bounds of the tooltip or if TooltipState.dismiss is called. When isPersistent is false, the tooltip will dismiss after a short duration. Ideally, this should be set to true when there is actionable content being displayed within a tooltip.

mutatorMutex

MutatorMutex used to ensure that for all of the tooltips associated with the mutator mutex, only one will be shown on the screen at any time.