Skip to content

Latest commit

 

History

13 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Reactions

A simple widget to simulate a component used by most of the social network apps to allow users to react to something. You can find the sample app Here

Maintainability


⚙️ The Widget

This widget demonstrates how easy it is to build something to allow users to react to posts, pictures, etc. It is build to use SF Symbols along with Colors.

To create your custom widget, all you need to do is to provide an array of Reaction as the input:

    let reactions = [
        Reaction(name: "hand.thumbsup.fill", color: Color(red: 0, green: 0.8, blue: 1)),
        Reaction(name: "smiley.fill", color: .yellow),
        Reaction(name: "flame.fill", color: .red),
        Reaction(name: "star.fill", color: .yellow),
        Reaction(name: "heart.fill", color: Color(red: 1, green: 0.4, blue: 0.3)),
    ]
    
    Reactions(reactions) { reaction in 
        print("this was the selected reaction: \(reaction)")
    }

🚂 Motivation

I just wanted to play around with SwiftUI, but this time, I was specially looking on how to interact with gestures like DragGesture.

💻 Requirements

  • iOS 13+
  • XCode 11

🤓 How to run

Since this project has zero dependencies on external frameworks, all you need is:

  1. Add https://github.com/caiobzen/Reactions.git to your XCode Project as a Package Dependency
  2. Done! :D

About

A simple widget for picking reactions

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages