Lottie EDGE Component
Cody P Christian
NativePHP^4.0iOS18.0+Android26+
Adds a <native:lottie-view> Blade tag that plays dotLottie animations natively — Jetpack Compose on Android and SwiftUI with lottie-spm on iOS. No code generation required.
Features
- dotLottie playback — play animations from bundled assets or remote URLs
- Native rendering — Jetpack Compose (Android) and SwiftUI (iOS) with no wrappers
- Configurable looping, sizing, and accessibility labels
- Offline-safe — bundled asset playback works without a network connection
- Auto-converts dotLottie v2 to v1 for iOS compatibility
- Static-renderer plugin — native dependencies declared cleanly in the manifest
Installation
composer require codypchristian/nativephp-lottie
php artisan native:plugin:register codypchristian/nativephp-lottie
Usage
<native:lottie-view
src="animations/confetti.lottie"
:loop="true"
accessibility-label="Confetti celebration"
/>
Supports both local asset paths and HTTPS URLs as the src value.