Swiftpack.co -  LukasHromadnik/Lottie-SwiftUI as Swift Package
Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
LukasHromadnik/Lottie-SwiftUI
SwiftUI wrapper of Lottie-iOS
.package(url: "https://github.com/LukasHromadnik/Lottie-SwiftUI.git", from: "1.1.0")

Lottie-SwiftUI

SwiftUI wrapper of Lottie-iOS. Very simple implementation that can be further expanded.

Currently only supports loopMode, other properties are not implemented yet. Feel free to create a pull request!

Installation

Swift Package Manager

import PackageDescription

let package = Package(
    name: "YourProjectName",
    platforms: [
        .iOS(.v13),
    ],
    dependencies: [
        .package(
            name: "LottieSwiftUI", 
            url: "https://github.com/LukasHromadnik/Lottie-SwiftUI.git",
            .upToNextMajor(from: Version(1, 1, 0))
        )
    ],
    targets: [
        .target(name: "YourTestProject", dependencies: ["LottieSwiftUI"])
    ]
)

Usage

import LottieSwiftUI

@State var playLottie = false

LottieView(name: "animation-name", play: $playLottie)
    .lottieLoopMode(.loop)

GitHub

link
Stars: 1
Last commit: 1 week ago

Ad: Job Offers

iOS Software Engineer @ Perry Street Software
Perry Street Software is Jack’d and SCRUFF. We are two of the world’s largest gay, bi, trans and queer social dating apps on iOS and Android. Our brands reach more than 20 million members worldwide so members can connect, meet and express themselves on a platform that prioritizes privacy and security. We invest heavily into SwiftUI and using Swift Packages to modularize the codebase.

Dependencies

Release Notes

1.1.0
1 week ago

1.1.0

Added

  • LottieView is now initializable with Lottie.Animation directly. #1 by @pokryfka

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API