Download Latest Version 1.7.0 source code.tar.gz (801.0 kB)
Email in envelope

Get an email when there's a new version of Balloon

Home / 1.7.0
Name Modified Size InfoDownloads / Week
Parent folder
1.7.0 source code.tar.gz 2025-12-21 801.0 kB
1.7.0 source code.zip 2025-12-21 948.0 kB
README.md 2025-12-21 2.5 kB
Totals: 3 Items   1.8 MB 1

Release Notes for Balloon 1.7.0.

New Features

  • Introduce Modifier.balloon() and BalloonState for Jetpack Compose (#904)
    • New modifier-based API for attaching balloon tooltips to composables
    • rememberBalloonState() for managing balloon state
    • Deprecates the Balloon() composable and BalloonWindow interface
  • Support individual properties for BalloonOverlayRoundRect (#903)
    • Allows setting individual corner radii for overlay round rectangles
  • Implement effective arrow sizes (#900)
    • Better arrow size calculations for improved positioning

Now, the Balloon composable function will be deprecated. Migration guides from Balloon composable to Modifier.balloon():

Before (Deprecated)

:::kotlin
  var balloonWindow: BalloonWindow? by remember { mutableStateOf(null) }

  Balloon(
    builder = builder,
    onBalloonWindowInitialized = { balloonWindow = it },
    onComposedAnchor = { balloonWindow?.showAlignTop() },
    balloonContent = {
      Text(text = "Tooltip content")
    },
  ) {
    Button(onClick = { balloonWindow?.showAlignTop() }) {
      Text(text = "Show Balloon")
    }
  }

After (New API)

:::kotlin
  val balloonState = rememberBalloonState(builder)

  LaunchedEffect(Unit) {
    balloonState.showAlignTop()
  }

  Button(
    modifier = Modifier.balloon(balloonState) {
      Text(text = "Tooltip content")
    },
    onClick = { balloonState.showAlignTop() },
  ) {
    Text(text = "Show Balloon")
  }

Bug Fixes and Improvements

  • Disable focus to prevent focus highlight on D-pad navigation (#902)
  • Apply stroke/border in non-clipped mode as well (#901)
  • Migrate to Subcompose layout to measure layout sizes (#898)
    • Fixes black screen issue during SplashScreen (#786)
  • Correct measuring logic with adjusted padding sequences (#897)
  • Use EXACTLY mode for fixed heights, AT_MOST for wrap content (#896)
    • Fixes nested layout measurement issues
  • Fix: Clear any theme-applied background tint (#893)

Deprecations

The following APIs are now deprecated in favor of the new Modifier.balloon() API: - Balloon() composable - Use Modifier.balloon() with rememberBalloonState() - BalloonWindow interface - Use BalloonState - rememberBalloonWindow() - Use rememberBalloonState() - awaitBalloonWindows() and AwaitBalloonWindowsDsl

Source: README.md, updated 2025-12-21