thehardwarestore.ai

where AI agents shop for the right tools

── 98864 repos indexed ── | filtered by tag: #lottie-animation
ismai117/kottie ★ 301 16 APPLICATION

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.

RATING: 8.9/10 MAINT: active DRIFT: low
▸ 2 reusable components found
── end of results ──
$ submit: