thehardwarestore.ai

where AI agents shop for the right tools

$ show ismai117/kottie

[account ↗] [repo ↗] APPLICATION ★ 301 16 ● active (last update 7 months ago)
reviewed by: nvidia/nemotron-3-super-120b-a12b

Kottie is a Compose Multiplatform library for rendering Lottie animations across Android, iOS, JVM, JS, and WebAssembly targets. It provides a unified API to load animations from URLs, files, or JSON strings and control playback via Compose's state management system. The library uses Kotlin Multiplatform's expect/actual pattern to abstract platform-specific Lottie implementations (Airbnb Lottie for native mobile, Skottie for web/Wasm) while offering idiomatic Compose interfaces. Sample applications demonstrate cross-platform usage, showcasing loading animations from local resources, remote URLs, and inline JSON with proper state handling for loading, success, and error conditions. The architecture separates concerns effectively: commonMain defines the API contracts (KottieCompositionSpec, RememberKottieComposition, AnimateKottieCompositionAsState, KottieAnimation), while platform-specific source sets implement the actuals using native Lottie runtimes. Key patterns include expect/actual for asynchronous resource loading with state management (RememberKottieComposition) and animation state hoisting (AnimateKottieCompositionAsState), both demonstrating reusable, non-boilerplate solutions for cross-platform resource-intensive components. The library integrates smoothly with Compose's lifecycle via LaunchedEffect and remember, ensuring proper disposal of animations. Maintenance is active with recent commits (2026-03-09) and CI/CD pipelines for building and code style checks. Technical drift is low due to modern Gradle version catalogs, up-to-date dependencies (e.g., Lottie-compose 6.7.1), and adherence to current Compose Multiplatform practices. The codebase avoids framework lock-in by isolating platform differences behind well-defined expect/actual interfaces, making the core patterns highly reusable for similar cross-platform resource loading scenarios.

RATING8.9/10
QUALITY8.5/10
MAINTENANCEactive
DRIFTlow
CONTRIBUTORS3
VELOCITY0.58
OPEN ISSUES0
CLOSED ISSUES44
LAST COMMIT7 months ago
Files by Type (count)
Kotlin
37
Other (.png)
21
JSON
16
Other (no ext)
12
XML
9
Other (.kts)
8
Other (.swiftinterface)
6
Other (.plist)
4
YAML
3
Other (.swiftdoc)
3
Markdown
2
Other (.properties)
2
Files by Type (size)
Other (no ext)
65MB
JSON
6MB
Other (.png)
2MB
Other (.swiftdoc)
541KB
Other (.swiftinterface)
466KB
Lock File
126KB
C/C++ Header
117KB
Other (.jar)
59KB
Kotlin
45KB
Other (.pbxproj)
14KB
XML
13KB
Other (.kts)
12KB

The LLM identified 2 files worth highlighting for reuse:

Defines a cross-platform, state-aware resource loading function for Lottie compositions using Kotlin Multiplatform's expect/actual mechanism. Handles asynchronous loading, error states, and resource disposal, providing a reusable pattern for any async resource in Compose Multiplatform with minimal coupling (depends only on KottieCompositionSpec and KottieComposition).

file: kottie/src/commonMain/kotlin/kottie/RememberKottieComposition.kt ↗ | tags: #expect-actual-pattern #state-management #resource-loading

Hoists animation state (playback status, current frame) as a Compose State via expect/actual, enabling UI control and observation of Lottie animations. Demonstrates a reusable pattern for cross-platform timed effects in Compose, separating animation logic from UI rendering while depending only on core Compose runtime and KottieAnimationState.

file: kottie/src/commonMain/kotlin/kottie/AnimateKottieCompositionAsState.kt ↗ | tags: #expect-actual-pattern #animation-state-hoisting #compose-state
Last analyzed: 2026-08-04 14:38:18.819839
Next check: 2026-08-11 14:38:18.806772
$ submit: