bj0
10/30/2025, 11:57 PMTooltipArea over a button it completely blocks the button and it becomes unusable. My searching showed a comment from 3 years ago where the only suggestion was to use a custom made alternative. Is the built in one still not really usable?Alexander Maryanovsky
10/31/2025, 8:55 AM@OptIn(ExperimentalFoundationApi::class)
fun main() = singleWindowApplication {
Box(Modifier.fillMaxSize(), contentAlignment = Alignment.Center) {
TooltipArea(
tooltip = {
Text(
text = "This is a button",
Modifier.background(Color.Yellow).border(Dp.Hairline, Color.Black).padding(8.dp)
)
},
tooltipPlacement = TooltipPlacement.ComponentRect(
anchor = Alignment.TopCenter,
alignment = Alignment.TopCenter
)
) {
Button(onClick = {}) {
Text("Button")
}
}
}
}Alexander Maryanovsky
10/31/2025, 8:55 AMtooltipPlacement = TooltipPlacement.CursorPoint(offset = DpOffset(16.dp, 16.dp))