Stylish Hover Card
fun StylishHoverCard(modifier: Modifier = Modifier, trigger: @Composable () -> Unit, shape: Shape = RoundedCornerShape(DefaultStylishDimensions.connectedCornerRadius), containerColor: Color = MaterialTheme.colorScheme.surfaceContainerHigh, contentColor: Color = MaterialTheme.colorScheme.onSurface, width: Dp = 320.dp, delayMillis: Int = 300, content: @Composable ColumnScope.() -> Unit)
A hover-triggered info card — the web "HoverCard" pattern from Radix UI and shadcn/ui.
Hovering the trigger shows a floating content card after delayMillis. Moving the pointer away dismisses it. This is a pointer (desktop) interaction: on touch devices the card does not open.
Parameters
modifier
Modifier applied to the trigger wrapper.
trigger
The content that opens the card on hover.
shape
Corner shape of the card. Defaults to RoundedCornerShape with DefaultStylishDimensions.connectedCornerRadius.
container Color
Background of the card. Defaults to MaterialTheme.colorScheme.surfaceContainerHigh.
content Color
Foreground color of the card.
width
Width of the card. Defaults to 320 dp.
delay Millis
Hover duration before the card opens. Defaults to 300 ms.
content
The card content.