Kotlin Multiplatform Development
 

Tooltips

Edit pageLast modified: 01 October 2024

You can add a tooltip to any component using the TooltipArea composable. TooltipArea is similar to the Box component and can show a tooltip.

The TooltipArea composable has the following main parameters:

  • tooltip, composable content of the tooltip.

  • tooltipPlacement, defines the tooltip position. You can specify an anchor (the mouse cursor or the component), an offset, and an alignment.

  • delayMillis, time in milliseconds after which the tooltip is shown. The default value is 500 ms.

https://resources.jetbrains.com/help/img/kotlin-multiplatform-dev/compose-desktop-tooltips.png
Gif