DeckKit is a tiny SwiftUI library that can help you create deck-based apps. It can look like this...or completely different:
I will improve documentation if anyone requests it (just create an issue), but basically it works like this:
CardItemis a protocol that inherits
Deckcan be created with a
Deck can be used as a plain data object, but can also bre presented with
DeckKit contains two
SwiftUI views for presenting a
StackedDeckstacks cards on top of eachother and lets the user swipe cards off the top.
HorizontalDeckpresents cards in a horizontal list and lets the user swipe horizontally.
You can build your own
Deck-based views as well, using plain
This repo contains a basic, universal demo app that runs on iOS 14 and macOS 11.
Just open the
Demo project and run the app on either platform.
The library could run on
watchOS as well, but there are currently no such demos.
This library wouldn't have been made without this amazing card tutorial.
Feel free to reach out if you have questions or if you want to contribute in any way:
DeckKit is available under the MIT license. See LICENSE file for more info.