Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/CSolanaM/SkeletonUI
☠️ Elegant skeleton loading animation in lightweight SwiftUI
https://github.com/CSolanaM/SkeletonUI
animation cocoapods combine gradient ios loading loading-animation loading-indicator loading-spinner macos placeholder placeholder-animation skeleton skeleton-animation skeletonization swift swift-package-manager swiftui tvos watchos
Last synced: 3 months ago
JSON representation
☠️ Elegant skeleton loading animation in lightweight SwiftUI
- Host: GitHub
- URL: https://github.com/CSolanaM/SkeletonUI
- Owner: CSolanaM
- License: mit
- Created: 2019-09-13T20:18:39.000Z (over 5 years ago)
- Default Branch: develop
- Last Pushed: 2024-08-10T11:37:45.000Z (5 months ago)
- Last Synced: 2024-10-29T15:47:36.572Z (3 months ago)
- Topics: animation, cocoapods, combine, gradient, ios, loading, loading-animation, loading-indicator, loading-spinner, macos, placeholder, placeholder-animation, skeleton, skeleton-animation, skeletonization, swift, swift-package-manager, swiftui, tvos, watchos
- Language: Swift
- Homepage:
- Size: 1.15 MB
- Stars: 863
- Watchers: 8
- Forks: 53
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
- awesome-swiftui-libraries - SkeletonUI - Elegant skeleton loading animation in SwiftUI and Combine. (Skeleton / Content)
README
SkeletonUI aims to bring an elegant, declarative syntax to skeleton loading animations. Get rid of loading screens or spinners and start using skeletons to represent final content shapes.
# Requirements :gear:
- macOS 10.15.
- Xcode 11.0.
- Swift 5.0.# Supported Platforms :iphone:
- iOS 13.0.
- tvOS 13.0.
- watchOS 6.0.
- macOS 10.15.# Installation :computer:
### Swift Package Manager
[Swift Package Manager](https://swift.org/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 `SkeletonUI` as a dependency is as easy as adding it to the `dependencies` value of your `Package.swift`.```swift
dependencies: [
.package(url: "https://github.com/CSolanaM/SkeletonUI.git", .branch("master"))
]
```### CocoaPods
[CocoaPods](https://cocoapods.org) is a centralized dependency manager for Cocoa projects. For usage and installation instructions, visit their website. To integrate SkeletonUI into your Xcode project using CocoaPods, specify it in your `Podfile`:```ruby
pod 'SkeletonUI'
```# Features :sparkles:
- [x] SwiftUI simple, declarative syntax.
- [x] Super easy and simple to set up.
- [x] All Views are skeletonables.
- [x] Fully customizable.
- [x] Universal (iPhone, iPad, iPod, Apple TV, Apple Watch, Mac).
- [x] SwiftUI ViewModifier power.
- [x] Lightweight codebase.# Usage :rocket:
### Basic one-liner:
```swift
import SkeletonUI
import SwiftUIstruct UsersView: View {
@State var users = [String]()var body: some View {
Text("Finished requesting \(users.count) users!")
.skeleton(with: users.isEmpty)
.onAppear {
DispatchQueue.main.asyncAfter(deadline: .now() + 5) {
self.users = ["John Doe", "Jane Doe", "James Doe", "Judy Doe"]
}
}
}
}
```### Advanced customization:
```swift
import SkeletonUI
import SwiftUIstruct User: Identifiable {
let id = UUID()
let name: String
}struct UsersView: View {
@State var users = [User]()var body: some View {
SkeletonList(with: users, quantity: 6) { loading, user in
Text(user?.name)
.skeleton(with: loading,
animation: .pulse(),
appearance: .solid(color: .red, background: .blue),
shape: .rectangle,
lines: 3,
scales: [1: 0.5])
}
.onAppear {
DispatchQueue.main.asyncAfter(deadline: .now() + 5) {
self.users = [User(name: "John Doe"),
User(name: "Jane Doe"),
User(name: "James Doe"),
User(name: "Judy Doe")]
}
}
}
}
```# Change Log :calendar:
See [CHANGELOG.md](https://github.com/CSolanaM/SkeletonUI/blob/master/CHANGELOG.md) for details.
# Contributing :tada:
- Suggest your idea as a [feature request](https://github.com/CSolanaM/SkeletonUI/issues/new?assignees=&labels=&template=feature_request.md&title=) for this project.
- Create a [bug report](https://github.com/CSolanaM/SkeletonUI/issues/new?assignees=&labels=&template=bug_report.md&title=) to help us improve.
- Propose your own fixes, suggestions and open a pull request with the changes.See [CONTRIBUTING.md](https://github.com/CSolanaM/SkeletonUI/blob/master/CONTRIBUTING.md) for details.
# Code of Conduct :speech_balloon:
See [CODE_OF_CONDUCT.md](https://github.com/CSolanaM/SkeletonUI/blob/master/CODE_OF_CONDUCT.md) for details.
# Credits :speak_no_evil:
SkeletonUI is owned and maintained by [CSolanaM](https://csolanam.io). You can follow me on Twitter at [@CSolanaM](https://twitter.com/CSolanaM) or contact me via [email](mailto:[email protected]) for project updates and releases.
# License :mortar_board:
SkeletonUI is released under the MIT license. See [LICENSE](https://github.com/CSolanaM/SkeletonUI/blob/master/LICENSE) for details.