Norbi
01/15/2024, 11:05 AManimate*AsState
somehow usable from Compose HTML? Thanks.David Herman
01/15/2024, 7:22 PMRobert Jaros
01/16/2024, 10:10 AMjs
target). The only issue is probably the bundle size, but it doesn't seem to be very large addon (about 50KB).Norbi
01/16/2024, 10:27 AMandroidx.compose.animation:animation
? it does not seem to work in multiplatform projects πRobert Jaros
01/16/2024, 10:28 AMsourceSets {
val jsMain by getting {
dependencies {
implementation(compose.html.core)
implementation(compose.runtime)
implementation(compose.animation)
}
}
}
Robert Jaros
01/16/2024, 10:29 AMkotlin.version=1.9.21
compose.version=1.5.11
Robert Jaros
01/16/2024, 10:29 AMorg.jetbrains.compose.experimental.jscanvas.enabled=true
Robert Jaros
01/16/2024, 10:31 AMvar enabled by mutableStateOf(true)
val alpha: Float by animateFloatAsState(if (enabled) 1f else 0.1f, tween(1000))
Div(attrs = {
style {
width(400.px)
color(rgba(255, 0, 0, alpha))
}
}) {
Text(info.value)
}
David Herman
01/16/2024, 6:44 PMDavid Herman
01/16/2024, 6:48 PMjscanvas
for?Robert Jaros
01/16/2024, 6:50 PMRobert Jaros
01/16/2024, 6:52 PMDavid Herman
01/16/2024, 7:03 PM