snowflake
1.0.1indexedLightweight animation library enables customizable snowflake effects in user interfaces. Features include adjustable density, color, and usage in any composable context, optimizing rendering for efficiency.
Lightweight animation library enables customizable snowflake effects in user interfaces. Features include adjustable density, color, and usage in any composable context, optimizing rendering for efficiency.
SnowflakeA lightweight and customizable snowflake animation library for Jetpack Compose Multiplatform, supporting Android, iOS, Desktop, and Web platforms.
Add beautiful animated snow effects to your UI effortlessly.
Add this module as a dependency in your Compose Multiplatform project.
Gradle (Kotlin DSL):
dependencies {
implementation("com.anasmusa:snowflake:$latest_version")
}
Snowflake(
modifier = Modifier.fillMaxSize(),
density = 5, // 1 (low) to 10 (high)
color = Color.White
)
SnowflakeBox(
modifier = Modifier.fillMaxSize(),
density = 7,
color = Color.Cyan,
contentAlignment = Alignment.Center
) {
Text("Happy Holidays!", color = Color.White)
}
SnowflakeRenders snowflake animation on a Canvas.
modifier: Modifier – Compose modifier to control layoutdensity: Int (1–10) – Number of snowflakesSnowflakeBoxRenders snowflakes as a background behind any composable content.
modifier: Inspired by the original snowflake animation from the Telegram Android client, this version is adapted and rewritten for Compose Multiplatform.
color: Color – Color of the snowflakescontentDescription: String? – Optional accessibility descriptionModifierdensity: Int (1–10)color: ColorcontentAlignment: AlignmentpropagateMinConstraints: Booleancontent: Composable lambda to provide inner UISurfaced from shared tags and platforms — no rankings paid for.