KaiOelfke / TagKit

TagKit makes it easy to create tag-based apps in SwiftUI.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TagKit Logo

Version Swift 5.6 Swift UI MIT License Twitter: @danielsaidi Mastodon: @danielsaidi@mastodon.social

About TagKit

TagKit makes it easy to work with tags and slugification in Swift and SwiftUI.

The result can look like this or completely different:

Tags and views can be customized to fit your specific needs. You can change the slug format and tag any custom models, and when presenting tags you can apply custom styling and use any views you like.

Installation

TagKit can be installed with the Swift Package Manager:

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

or with CocoaPods:

pod TagKit

If you prefer to not have external dependencies, you can also just copy the source code into your app.

Supported Platforms

TagKit supports iOS 13, macOS 11, tvOS 13 and watchOS 6.

Getting started

The online documentation has a getting-started guide that will help you get started with the library.

In TagKit, you can use the Slugifiable protocol to describe slufiable types. String implements this protocol by returning itself as the slugifiable value. You can then use the slugified() function on any Slugifiable type to get a slugified value that accounts for spaces, unwanted characters etc.

With slugified strings in place, we can then use the Taggable protocol to describe taggable types. Once a type implements Taggable, it can make use of all the functionality that the protocol provides, such as adding or removing tags, check if a tag has been added etc.

Finally, TagKit has a couple of views to list and edit tags. For more information, please see the online documentation and getting started guide.

Documentation

The online documentation contains more information, code examples, etc., and makes it easy to overview the various parts of the library.

Demo Application

I will create a demo application for this package once it gets 100+ stars.

Support

You can sponsor this project on GitHub Sponsors or get in touch for paid support.

Contact

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

License

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

About

TagKit makes it easy to create tag-based apps in SwiftUI.

License:MIT License


Languages

Language:Swift 90.0%Language:Ruby 10.0%