danielsaidi/DeckKit
Create deck-based apps in SwiftUI.
Installation
DeckKit can be installed with the Swift Package Manager:
https://github.com/danielsaidi/DeckKit.gitGetting started
With DeckKit, you can create a deck of cards with any type that conforms to Identifiable:
struct Hobby: Identifiable {
var name: String
var text: String
var id: String { name }
}
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)
}
}
}DeckKit has several view components for presenting decks, e.g. DeckView and DeckPageView.
See the online [getting started guide][Getting-Started] for more information.
Documentation
The online [documentation][Documentation] has more information, articles, code examples, etc.
Demo Application
The Demo folder has an app that lets you explore the library on iOS, macOS, and visionOS.
Support My Work
Maintaining my various [open-source tools][OpenSource] takes significant time and effort. You can [become a sponsor][Sponsors] to help me dedicate more time to creating, maintaining, and improving these projects. Every contribution, no matter the size, makes a real difference in keeping these tools free and actively developed. Thank you for considering!
Contact
Feel free to reach out if you have questions or want to contribute in any way:
- Website: [danielsaidi.com][Website]
- E-mail: [daniel.saidi@gmail.com][Email]
- Bluesky: [@danielsaidi@bsky.social][Bluesky]
- Mastodon: [@danielsaidi@mastodon.social][Mastodon]
License
DeckKit is available under the MIT license. See the [LICENSE][License] file for more info.
[Email]: mailto:daniel.saidi@gmail.com [Website]: https://danielsaidi.com [GitHub]: https://github.com/danielsaidi [OpenSource]: https://danielsaidi.com/opensource [Sponsors]: https://github.com/sponsors/danielsaidi
[Bluesky]: https://bsky.app/profile/danielsaidi.bsky.social [Mastodon]: https://mastodon.social/@danielsaidi [Twitter]: https://twitter.com/danielsaidi
[Documentation]: https://danielsaidi.github.io/DeckKit/ [Getting-Started]: https://danielsaidi.github.io/DeckKit/documentation/deckkit/getting-started [License]: https://github.com/danielsaidi/DeckKit/blob/master/LICENSE
Package Metadata
Repository: danielsaidi/DeckKit
Homepage: https://danielsaidi.com/opensource
Stars: 873
Forks: 23
Open issues: 4
Default branch: master
Primary language: shell
License: MIT
Topics: cards, ios, macos, swift, swiftui, tvos, visionos, watchos
README: README.md