SwiftUI TagView

Creating a simple selectable tag view in SwiftUI is quite a challenge. here is a simple & elegant example of it.

Output Example

Usage:

Just copy the TagView.swift file in your project & write your tags like so:

TagView(tags: [TagViewItem(title: “cat”, isSelected: false), TagViewItem(title: “dog”, isSelected: true)])

GitHub

View Github