Swiftpack.co - Package - caiobzen/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


⚙️ 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


Stars: 0
Help us keep the lights on


Used By

Total: 0


1.1.2 - Sep 28, 2019

1.0.0 - Sep 27, 2019