Skip to content

Skeptick/snowfall-compose

Repository files navigation

snowfall-compose

Very simple snowfall animation modifier for Compose Multiplatform.

Screenshot

Setup

kotlin {
    commonMain {
        dependencies {
            implementation("io.github.skeptick.snowfall:snowfall-compose:1.0.2")
        }
    }
}

Usage

Box(
    modifier = Modifier
        .fillMaxSize()
        .snowfall()
)
Box(
    modifier = Modifier
        .fillMaxSize()
        .snowfall(
            color = Color.White,
            alpha = 0.3f,
            strokeWidth = 1f,
            drawPosition = SnowfallDrawPosition.Ahead,
            snowflakeMinSize = 10.dp,
            snowflakeMaxSize = 20.dp,
            snowflakeMinSpeed = 0.2.dp,
            snowflakeMaxSpeed = 1.dp,
            snowflakeDensity = 1f
        )
) {
    // content
}

About

Very simple snowfall animation modifier for Compose Multiplatform

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages