You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Find latest version and changelogs in the releases.
❓ Usage
Wrap the content to explode in Explodable and trigger the explosion with explosionController.explode()
val explosionController = rememberExplosionController()
Explodable(controller = explosionController) {
//Content to explodeBox(modifier =Modifier
.size(100.dp)
.background(Color.Black)
.clickable { explosionController.explode() })
}
🎨 Customization
ExplodingComposable offers a variety of customizations
val explosionController = rememberExplosionController()
Explodable(
//Standard compose modifier
modifier =Modifier,
// Control the explosion state with an instance of ExplosionController// You can access it using rememberExplosionController() method// Provides methods controller.explode() and controller.reset()
controller = explosionController,
// Control the animation with these params
animationSpec =ExplosionAnimationSpec(
// The higher the number, the bigger the explosion
explosionPower =2f,
// Duration for the particle explosion
explosionDurationMs =750,
// Duration for the shake effect before explosion
shakeDurationMs =250
),
// Callback to fire when explosion is finished
onExplode = {
},
// To control the explosion manually, use this param [0f-1f]
currentProgress = progress,
// The composable to explode
content = {
}
)