Ashutoshwahane / Animator

Retro Animations for Compose Android Development. Made with ❤️ for Modern Android development

Home Page:https://github.com/Ashutoshwahane/Animator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

🦋 Animator


🦋 Retro Animations for Compose Android Development. Made with ❤️ for Modern Android development.

👨🏽‍💻 Implementation

You can check app directory which includes example application for demonstration.

🚀 Gradle setup

In setting.gradle.kts include this dependency

dependencyResolutionManagement {
    repositories {
        maven ("https://jitpack.io")
    }
}

Now In build.gradle.kts include this dependency

 implementation("com.github.Ashutoshwahane:Animator:0.3-beta")

How to Use

BouncyCompose is a Jetpack Compose function that creates a bouncing animation effect for a provided content within a Compose UI. The animation simulates the movement of an element within a defined screen area, bouncing back when reaching the boundaries.

val local = LocalConfiguration.current
val xWidth = local.screenWidthDp.dp
val xHeight = local.screenHeightDp.dp
BouncyCompose(
    modifier: Modifier = Modifier, 
    screenWidth: Dp = Dp(300f), 
    screenHeight: Dp = Dp(500f), 
    content: @Composable () -> Unit, 
    speedXPosition: Float = 2.0f, 
    speedYPosition: Float = 2.0f
)

HeartBeatCompose is a Jetpack Compose function that creates a heartbeat animation effect for a provided content within a Compose UI. The animation simulates the pulsation of an element, expanding and contracting in size.

val local = LocalConfiguration.current
val xWidth = local.screenWidthDp.dp
val xHeight = local.screenHeightDp.dp
HeartBeatCompose(modifier: Modifier = Modifier, content: @Composable () -> Unit)

CircularProgressCTA is a Jetpack Compose function that creates a button with dynamic width and height transitions, along with optional circular progress and completion check mark animations.

val local = LocalConfiguration.current
val xWidth = local.screenWidthDp.dp
CircularProgressCTA(
    buttonWidth = xWidth,
    isCompleted = false,
    drawableResource = R.drawable.ic_checked_circle
    ){
        // Handle CTA Click
    }

SwipingSliderCTA Swipe seamlessly from start to end with intuitive interface. As you swipe, the icon gracefully moves, and the track changes color to guide your progress. With built-in lambda functions, you can effortlessly integrate custom actions or code snippets

UnlockSlider(
                isLoading = isLoading,
                onSwipeComplete = {
                    //Handle CTA 
                },
                startIcon = painterResource(id = R.drawable.ic_heart),
                completionColor = Color.LightGray,
                endIcon = painterResource(id = R.drawable.icon_butterfly),
                hintText = "Swipe to Unlock"

            )

🍻 Contribute

Contribution Guideline contribution guidelines.

If you find this library helpful ❤️

show some love and Support Animator . ⭐
Also, follow me on GitHub for my next creations! 🤩

About

Retro Animations for Compose Android Development. Made with ❤️ for Modern Android development

https://github.com/Ashutoshwahane/Animator

License:MIT License


Languages

Language:Kotlin 100.0%