dec

DeckKit

DeckKit is a tiny library that helps you create card-based apps in SwiftUI.

Showing:

Popularity

Downloads/wk

0

GitHub Stars

112

Maintenance

Last Commit

5mos ago

Contributors

0

Package

Dependencies

0

License

MIT

Categories

Readme

DeckKit


Version Platform Swift 5.3 MIT License Twitter: @danielsaidi

About DeckKit

DeckKit is a tiny SwiftUI library that can help you create deck-based apps. It can look like this...or completely different:

Installation

Swift Package Manager

https://github.com/danielsaidi/DeckKit.git

CocoaPods

pod DeckKit

How does it work

I will improve documentation if anyone requests it (just create an issue), but basically it works like this:

  • CardItem is a protocol that inherits Identifiable and Equatable
  • A Deck can be created with a CardItem collection.

A Deck can be used as a plain data object, but can also bre presented with SwiftUI.

SwiftUI

DeckKit contains two SwiftUI views for presenting a Deck:

  • StackedDeck stacks cards on top of eachother and lets the user swipe cards off the top.
  • HorizontalDeck presents cards in a horizontal list and lets the user swipe horizontally.

You can build your own Deck-based views as well, using plain SwiftUI views.

Demo app

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 tvOS and watchOS as well, but there are currently no such demos.

Acknowledgements

This library wouldn't have been made without this amazing card tutorial.

Contact me

Feel free to reach out if you have questions or if you want to contribute in any way:

License

DeckKit is available under the MIT license. See LICENSE file for more info.

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100