Skip to content

alanpaivaa/Tagly

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tagly

Tagly allows displaying lists in a tag cloud manner. It is focused and entirely written in SwiftUI, which means the API resembles the API of primitive views, such as list and stacks.

Installation

You should use Cocoapods to install Tagly. Update your Podfile as follows:

target 'MyApp' do
  pod 'Tagly', '~> 0.1'
end

Then run pod install. After the command finishes, Tagly should be available in your workspace.

Usage

You only need to provide a collection of identifiable elements, a closure to build each tag and, optionally, the spacing between the tags:

import Tagly

...

TagCloudView(data: tags, spacing: 8) { tag in
    Text(tag.title)
        .foregroundColor(Color.white)
        .padding(.horizontal, 10)
        .padding(.vertical, 5)
        .background(Color.black)
        .cornerRadius(5)
}

And you got this beautiful tag cloud:

Requirements

iOS >= 13.0

License

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

About

Library for easy Tag Cloud View in SwiftUI

Resources

License

Stars

Watchers

Forks

Packages

No packages published