目录
目录README.md

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.

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

Installation

TagKit can be installed with the Swift Package Manager:

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

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

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 this library

I manage my various open-source projects in my free time and am really thankful for any help I can get from the community.

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.

关于
12.2 MB
邀请码