# TooltipState

Artifact: [androidx.compose.material3:material3](https://developer.android.com/jetpack/androidx/releases/compose-material3) [View Source](https://cs.android.com/search?q=file:androidx/compose/material3/Tooltip.kt+class:androidx.compose.material3.TooltipState) Common/AllAndroid/JVM
- Cmn

  ```
  @ExperimentalMaterial3Api
  interface TooltipState
  ```

*** ** * ** ***

The state that is associated with a `https://developer.android.com/reference/kotlin/androidx/compose/material3/TooltipBox.composable#TooltipBox(androidx.compose.ui.window.PopupPositionProvider,kotlin.Function1,androidx.compose.material3.TooltipState,androidx.compose.ui.Modifier,kotlin.Function0,kotlin.Boolean,kotlin.Boolean,kotlin.Boolean,kotlin.Function0)`. Each instance of `https://developer.android.com/reference/kotlin/androidx/compose/material3/TooltipBox.composable#TooltipBox(androidx.compose.ui.window.PopupPositionProvider,kotlin.Function1,androidx.compose.material3.TooltipState,androidx.compose.ui.Modifier,kotlin.Function0,kotlin.Boolean,kotlin.Boolean,kotlin.Boolean,kotlin.Function0)` should have its own `https://developer.android.com/reference/kotlin/androidx/compose/material3/TooltipState`.

## Summary

| ### Public functions |
|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/material3/TooltipState#dismiss()()` Dismiss the tooltip associated with this `https://developer.android.com/reference/kotlin/androidx/compose/material3/TooltipState` if it's currently being shown. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/material3/TooltipState#onDispose()()` Clean up when the this state leaves Composition. | Cmn |
| `suspend https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/material3/TooltipState#show(androidx.compose.foundation.MutatePriority)(mutatePriority: https://developer.android.com/reference/kotlin/androidx/compose/foundation/MutatePriority)` Show the tooltip associated with the current `https://developer.android.com/reference/kotlin/androidx/compose/material3/TooltipState`. | Cmn |

| ### Public properties |
|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/material3/TooltipState#isPersistent()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` that determines if the tooltip associated with this will be persistent or not. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/material3/TooltipState#isVisible()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` that indicates if the tooltip is currently being shown or not. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/MutableTransitionState<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html>` | `https://developer.android.com/reference/kotlin/androidx/compose/material3/TooltipState#transition()` The current transition state of the tooltip. | Cmn |

## Public functions

### dismiss

Cmn

```
fun dismiss(): Unit
```

Dismiss the tooltip associated with this `https://developer.android.com/reference/kotlin/androidx/compose/material3/TooltipState` if it's currently being shown.

### onDispose

Cmn

```
fun onDispose(): Unit
```

Clean up when the this state leaves Composition.

### show

Cmn

```
suspend fun show(mutatePriority: MutatePriority = MutatePriority.Default): Unit
```

Show the tooltip associated with the current `https://developer.android.com/reference/kotlin/androidx/compose/material3/TooltipState`. When this method is called all of the other tooltips currently being shown will dismiss.

| Parameters |
|---|---|
| `mutatePriority: https://developer.android.com/reference/kotlin/androidx/compose/foundation/MutatePriority = MutatePriority.Default` | `https://developer.android.com/reference/kotlin/androidx/compose/foundation/MutatePriority` to be used. |

## Public properties

### isPersistent

Cmn

```
val isPersistent: Boolean
```

`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` 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 `https://developer.android.com/reference/kotlin/androidx/compose/material3/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.

### isVisible

Cmn

```
val isVisible: Boolean
```

`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` that indicates if the tooltip is currently being shown or not.

### transition

Cmn

```
val transition: MutableTransitionState<Boolean>
```

The current transition state of the tooltip. Used to start the transition of the tooltip when fading in and out.