kmp-loading-animations
2.0.5indexedReady-to-use animated loading/spinner indicators with extensive customization, a linked catalog for lookup/random selection, and a showcase grid featuring 30+ styles.
Ready-to-use animated loading/spinner indicators with extensive customization, a linked catalog for lookup/random selection, and a showcase grid featuring 30+ styles.
A collection of beautiful, ready-to-use loading & spinner animations for Compose Multiplatform — Android, iOS, Desktop (JVM), and Web.
Adapted from the famous AVLoadingIndicatorView and rebuilt from the ground up with Kotlin Multiplatform + Compose.
Add the dependency to your commonMain source set:
// build.gradle.kts
kotlin {
sourceSets {
commonMain.dependencies {
implementation("io.github.akimaleo:kmp-loading-animation:2.0.5")
}
}
}
That's it! Works on all platforms: Android, iOS, Desktop, JS, and WasmJS.
@Composable
fun Greeting() {
PacmanIndicator()
}
Every indicator exposes optional parameters for full customisation:
PacmanIndicator(
color = Color.Black,
ballDiameter = 60f,
canvasSize = 60.dp,
animationDuration = 1000
)
Additional indicators: GridFadeDiagonal, GridFadeAntiDiagonal,
BallRespectivelyExitIndicator, TriangleShapeIndicator,
CircleShapeIndicator.
The indicatorsCatalog() function returns a
Map<IndicatorType, @Composable () -> Unit> — a linked map that preserves
insertion order. Use it to look up a specific indicator by key, iterate over all
entries, or pick one at random.
import com.kawa.loading.kmp.indicatorsCatalog
import com.kawa.loading.kmp.enums.IndicatorType
val catalog = indicatorsCatalog() // white, 40.dp
val catalog = indicatorsCatalog(
color = Color.Cyan,
sizeDp = 60.dp
)
@Composable
fun MyScreen() {
// Direct map access — no searching required
indicatorsCatalog()[IndicatorType.PACMAN]?.invoke()
}
@Composable
fun RandomLoader() {
val catalog = remember { indicatorsCatalog(color = Color.White) }
val (type, indicator) = remember { catalog.entries.random() }
Column(horizontalAlignment = Alignment.CenterHorizontally) {
indicator()
Text(type.displayName)
}
}
@Composable
fun ListAll() {
val catalog = indicatorsCatalog()
catalog.forEach { (type, indicator) ->
Row {
indicator()
Text(type.displayName)
}
}
}
@Composable
fun App() {
LoadingShowcase() // adaptive grid with labels
}
IndicatorType valuesPULSATING_DOT, GRID_PULSATING, CIRCULAR_PULSATING,
BALL_CLIP_ROTATE_PULSE, SQUARE_SPIN, BALL_CLIP_ROTATE_MULTIPLE,
BALL_PULSE_RISE, BALL_ROTATE, CUBE_TRANSITION,
BALL_ZIG_ZAG, BALL_ZIG_ZAG_DEFLECT, BALL_TRIANGLE_PATH,
BALL_SCALE, LINE_SCALE_ACCORDION, LINE_SCALE_RANDOM,
BALL_SCALE_MULTIPLE, BALL_PULSE_SYNC, BALL_BEAT,
LINE_SCALE_SYMMETRIC, LINE_SCALE_PULSE_OUT,
BALL_SCALE_RIPPLE, BALL_SCALE_RIPPLE_MULTIPLE,
BALL_SPIN_FADE_LOADER, LINE_SPIN_FADE_LOADER,
TRIANGLE_SPIN, PACMAN, GRID_BEAT, SEMI_CIRCLE_SPIN
| Platform | Status |
|---|---|
| Android | ✅ |
Copyright 2023 Mahboubeh Seyedpour
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance the License.
You may obtain a copy of the License at
http:
Unless applicable law agreed to writing, software
distributed under the License distributed an BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express implied.
See the License the specific language governing permissions
limitations under the License.
| # | Indicator | # | Indicator |
|---|
| 1 | PulsatingDot | 15 | LineScaleIndicator (random) |
| 2 | GridIndicator (pulsating) | 16 | BallScaleMultipleIndicator |
| 3 | CircularPulsatingIndicator | 17 | BallPulseSyncIndicator |
| 4 | BallClipRotatePulseIndicator | 18 | BallBeatIndicator |
| 5 | SquareSpinIndicator | 19 | LineScaleIndicator (symmetric) |
| 6 | BallClipRotateMultipleIndicator | 20 | LineScaleIndicator (pulse-out) |
| 7 | BallPulseRiseIndicator | 21 | BallScaleRippleIndicator |
| 8 | BallRotateIndicator | 22 | BallScaleRippleMultipleIndicator |
| 9 | CubeTransitionIndicator | 23 | BallSpinFadeLoaderIndicator |
| 10 | BallZigZagIndicator | 24 | LineSpinFadeLoaderIndicator |
| 11 | BallZigZagDeflectIndicator | 25 | TriangleSpinIndicator |
| 12 | BallTrianglePathIndicator | 26 | PacmanIndicator |
| 13 | BallScaleIndicator | 27 | GridIndicator (beating) |
| 14 | LineScaleIndicator (accordion) | 28 | SemiCircleSpinIndicator |
| iOS | ✅ |
| Desktop (JVM) | ✅ |
| Web (JS) | ✅ |
| Web (Wasm) | ✅ |
Surfaced from shared tags and platforms — no rankings paid for.