Skip to content

esatgozcu/Compose-Rolling-Number

Repository files navigation

Compose-Rolling-Number

A rotating number component inspired by Uacaps written in Jetpack Compose.

Installation

1- Add it in your settings.gradle - dependencyResolutionManagement

repositories {
      ...
      maven { url 'https://jitpack.io' }
}

2- Add the dependency

dependencies {
      implementation 'com.github.esatgozcu:Compose-Rolling-Number:1.0.5'
}

Example Usage

val number = remember { mutableStateOf(100) }
RollingNumberView(vm = RollingNumberVM(number.value.toString(), suffix = "$"))

Text(text = "Animate", Modifier.clickable {
    number.value = number.value + 123.34355111
})