Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/danielsaidi/DeckKit
DeckKit is a Swift SDK that helps you build deck-based apps in SwiftUI.
https://github.com/danielsaidi/DeckKit
ios macos swift swiftui tvos visionos watchos
Last synced: 3 months ago
JSON representation
DeckKit is a Swift SDK that helps you build deck-based apps in SwiftUI.
- Host: GitHub
- URL: https://github.com/danielsaidi/DeckKit
- Owner: danielsaidi
- License: mit
- Created: 2020-08-31T05:51:52.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2024-05-06T08:16:00.000Z (6 months ago)
- Last Synced: 2024-05-13T14:09:19.553Z (6 months ago)
- Topics: ios, macos, swift, swiftui, tvos, visionos, watchos
- Language: Swift
- Homepage:
- Size: 13.3 MB
- Stars: 566
- Watchers: 8
- Forks: 14
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
- mobile-awesome - DeckKit - DeckKit makes it easy to create deck-based apps in SwiftUI. (iOS / Android samples)
- awesome-starts - danielsaidi/DeckKit - DeckKit is a tiny library that helps you create card-based apps in SwiftUI. (Swift)
- awesome-swiftui-libraries - DeckKit - DeckKit is a tiny library that helps you create card-based apps in SwiftUI. (Card / Content)
README
## About DeckKit
DeckKit is a Swift SDK that helps you build deck-based apps in SwiftUI.
DeckKit has a `DeckView` that can render any item collection, with support for swipe gestures, edge swipe detection, shuffling, etc. The result can look like this or completely different:
DeckKit has other views as well, and can be customized to great extent. You can change colors, fonts, etc. and use completely custom views. It also has tools to manage favorite items.
## Installation
DeckKit can be installed with the Swift Package Manager:
```
https://github.com/danielsaidi/DeckKit.git
```## Getting started
With DeckKit, you can create a `Deck` of any model that implement the `DeckItem` protocol:
```swift
struct Hobby: DeckItem {
var name: String
var text: Stringvar id: String { name }
}
```You can display a deck of cards with any of the built-in views, like a `DeckView`:
```swift
struct MyView: View {@State
var hobbies: [Hobby] = ...var body: some View {
DeckView($hobbies) { hobby in
RoundedRectangle(cornerRadius: 25.0)
.fill(.blue)
.overlay(Text(hobby.name))
.shadow(radius: 10)
}
}
}
```For more information, please see the [getting started guide][Getting-Started].
## Documentation
The [online documentation][Documentation] has more information, articles, code examples, etc.
## Demo Application
The demo app lets you explore the library with iOS, macOS, and visionOS. To try it out, just open and run the `Demo` project.
## Support my work
You can [sponsor me][Sponsors] on GitHub Sponsors or [reach out][Email] for paid support, to help support my [open-source projects][OpenSource].
Your support makes it possible for me to put more work into these projects and make them the best they can be.
## Contact
Feel free to reach out if you have questions or if you want to contribute in any way:
* Website: [danielsaidi.com][Website]
* Mastodon: [@[email protected]][Mastodon]
* Twitter: [@danielsaidi][Twitter]
* E-mail: [[email protected]][Email]## License
DeckKit is available under the MIT license. See the [LICENSE][License] file for more info.
[Email]: mailto:[email protected]
[Website]: https://www.danielsaidi.com
[GitHub]: https://www.github.com/danielsaidi
[Twitter]: https://www.twitter.com/danielsaidi
[Mastodon]: https://mastodon.social/@danielsaidi
[Sponsors]: https://github.com/sponsors/danielsaidi
[OpenSource]: https://www.danielsaidi.com/opensource[Documentation]: https://danielsaidi.github.io/DeckKit/documentation/deckkit/
[Getting-Started]: https://danielsaidi.github.io/DeckKit/documentation/deckkit/getting-started
[License]: https://github.com/danielsaidi/DeckKit/blob/master/LICENSE