LottieUI - A library developed to make Lottie easy to implement. It supports iOS and macOS

Overview

LottieUI

It is a library developed to make Lottie easy to implement. It supports iOS and macOS.

Platforms iOS macOS instagram SPM MIT

Screenshot

LottieUI.mp4

Example

https://fabulaapp.page.link/225

Usages

  1. LUStateData examples.

    /// Loads an animation model from a bundle by its name.
    let state1 = LUStateData(type: .name("bubble1"), loopMode: .loop)
    /// Loads a Lottie animation asynchronously from the URL.
    let state2 = LUStateData(type: .loadedFrom(URL(string: "https://assets9.lottiefiles.com/packages/lf20_mniampqn.json")!), speed: 1.0, loopMode: .loop)
    /// Loads an animation from a specific filepath.
    let state3 = LUStateData(type: .filepath("/Users/jasu/Downloads/bubble2.json"), speed: 1.0, loopMode: .loop)
  2. How to use LottieView.

    /// 1
    LottieView(state: state1)
    ...
    /// 2
    LottieView(state: state1, onCompleted: { success in
        print("Completed")
    }, onDownloaded: { success in
        print("Downloaded")
    })
    ...
    /// 3
    VStack {
        LottieView(state: state1, value: value, onCompleted: { success in
            print("Completed")
        }, onDownloaded: { success in
            print("Downloaded")
        })
        Slider(value: $value, in: 0...1)
    }

Swift Package Manager

The Swift Package Manager is a tool for automating the distribution of Swift code and is integrated into the swift compiler. Once you have your Swift package set up, adding LottieUI as a dependency is as easy as adding it to the dependencies value of your Package.swift.

dependencies: [
    .package(url: "https://github.com/jasudev/LottieUI.git", .branch("main"))
]

Contact

instagram : @dev.fabula
email : [email protected]

License

LottieUI is available under the MIT license. See the LICENSE file for more info.

You might also like...
A DSL to make animation easy on iOS with Swift.
A DSL to make animation easy on iOS with Swift.

This project is highly inspired by JHChainableAnimations, If you project is developed with Objective-C, use JHChainableAnimations instead. With DKChai

CCMRadarView uses the IBDesignable tools to make an easy customizable radar view with animation
CCMRadarView uses the IBDesignable tools to make an easy customizable radar view with animation

CCMRadarView CCMRadarView is a simple to use view that uses the new IBDesignable and IBInspectable features of XCode6 to easily configure the icon in

Presentation helps you to make tutorials, release notes and animated pages.
Presentation helps you to make tutorials, release notes and animated pages.

Presentation helps you to make tutorials, release notes and animated pages.

Accessbility workshop by hacking with swift. Make every app more usefull for the all the users
Accessbility workshop by hacking with swift. Make every app more usefull for the all the users

Accessibility Accessbility workshop by hacking with swift. Make every app more u

A SwiftUI component to make handling of email links better.

EmailLink A SwiftUI component to make handling of email links better. Not only will EmailLink use the correct default client, it will also prompt the

API to make great custom transitions in one method
API to make great custom transitions in one method

AZTransitions Make your modal transition with custom animation. AZTransitions helps you think about creativity, giving specific API methods. Visual Ex

Easy animation library on iOS with Swift2
Easy animation library on iOS with Swift2

Cheetah Cheetah is an animation utility on iOS with Swift. Cheetah can animate any properties since Cheetah uses simple CADisplayLink run loop to chan

Swift animation library for iOS, tvOS and macOS.
Swift animation library for iOS, tvOS and macOS.

anim is an animation library written in Swift with a simple, declarative API in mind. // moves box to 100,100 with default settings anim { self.bo

Letters animation allows you to click on different letters and accordingly it will animate letters in a cool way. It has a very attractive UI and is very easy to use.
Letters animation allows you to click on different letters and accordingly it will animate letters in a cool way. It has a very attractive UI and is very easy to use.

Letters Animation Cool Letters Animation in iOS written in Swift. Preview Table of content :- Description How to add in your project Requirement Licen

Comments
  • Made dependency on lottie-ios package safe

    Made dependency on lottie-ios package safe

    Hello, @jasudev, good work on porting lottie-ios package to SwiftUI!

    I saw that the dependency on the lottie-ios package is not safe, because the .branch("master") versioning rule is set, which means that if the major version of the library incremented (backward incompatible changes are introduced), then this library will also receive this version and it could stop working, due to API incompatibility. That is why I changed the versioning rule to be upToNextMajor(from: "3.0.0") which means that library will depend only on those versions that are greater than 3.0.0 and lower than 4.0.0

    opened by onl1ner 1
Releases(0.5.0)
Owner
jasu
jasu
jasu 29 Dec 20, 2022
LottieView - Wrapper around Lottie in SwiftUI that allows chaining animations & triggering callbacks at certain frames

LottieView is a Wrapper around Lottie in SwiftUI that allows chaining animations & triggering callbacks at certain frames

Ahmed Ramy 0 Jan 23, 2022
(Animate CSS) animations for iOS. An easy to use library of iOS animations. As easy to use as an easy thing.

wobbly See Wobbly in action (examples) Add a drop of honey ?? to your project wobbly has a bunch of cool, fun, and easy to use iOS animations for you

Sagaya Abdulhafeez 150 Dec 23, 2021
(Animate CSS) animations for iOS. An easy to use library of iOS animations. As easy to use as an easy thing.

wobbly See Wobbly in action (examples) Add a drop of honey ?? to your project wobbly has a bunch of cool, fun, and easy to use iOS animations for you

Sagaya Abdulhafeez 150 Dec 23, 2021
BWMCoverView is a very easy to use advertising the carousel view, supports circular scrolling functions such as switching, asynchronous loading of images, animation, custom is very high.

BWMCoverView BWMCoverView is a very easy to use advertising the carousel view, supports circular scrolling functions such as switching, asynchronous l

Bi Weiming 31 Mar 10, 2021
A port of SwiftUILab's Advanced Animations that also supports macOS

SwiftUILab Advanced Animations on the Mac as well A port of SwiftUILab's Advanced Animations that also supports macOS Here's the Ghist of the original

Mihaela Mihaljevic Jakic 10 Jan 2, 2023
Fortune spinning wheel library built using SwiftUI, supports dynamic content.

Fortune Wheel Fortune spinning wheel ?? library built using SwiftUI, supports dynamic content. Preview - Spin Wheel ⚙️ CocoaPods Installation FortuneW

Sameer Nawaz 51 Dec 23, 2022
A micro-framework that leverages Swift Property Wrappers to implement the Service Locator pattern

Locatable Context Locatable is a Swift micro framework that leverages Property Wrappers to implement the Service Locator pattern, through a custom att

Vincent Pradeilles 116 Jan 9, 2022
Twinkle is a Swift and easy way to make any UIView in your iOS or tvOS app twinkle.

Twinkle ✨ Twinkle is a Swift and easy way to make any UIView in your iOS or tvOS app twinkle. This library creates several CAEmitterLayers and animate

patrick piemonte 600 Nov 24, 2022