{"id":19514363,"url":"https://github.com/yannickl/reactions","last_synced_at":"2025-04-04T17:09:24.240Z","repository":{"id":43040207,"uuid":"70096973","full_name":"yannickl/Reactions","owner":"yannickl","description":"Fully customizable Facebook reactions like control","archived":false,"fork":false,"pushed_at":"2023-04-06T08:07:42.000Z","size":393,"stargazers_count":583,"open_issues_count":24,"forks_count":91,"subscribers_count":17,"default_branch":"master","last_synced_at":"2025-03-28T16:09:27.927Z","etag":null,"topics":["facebook","reactions","swift"],"latest_commit_sha":null,"homepage":"http://cocoadocs.org/docsets/Reactions","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yannickl.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2016-10-05T20:31:49.000Z","updated_at":"2025-02-18T14:37:38.000Z","dependencies_parsed_at":"2022-08-31T23:01:19.623Z","dependency_job_id":"858675ee-81c9-4f71-be64-27e03e0dfc6a","html_url":"https://github.com/yannickl/Reactions","commit_stats":{"total_commits":51,"total_committers":1,"mean_commits":51.0,"dds":0.0,"last_synced_commit":"1a03f0380342f62868f0a658abe0764d935f1095"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yannickl%2FReactions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yannickl%2FReactions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yannickl%2FReactions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yannickl%2FReactions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yannickl","download_url":"https://codeload.github.com/yannickl/Reactions/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247217221,"owners_count":20903009,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["facebook","reactions","swift"],"created_at":"2024-11-10T23:36:02.774Z","updated_at":"2025-04-04T17:09:24.217Z","avatar_url":"https://github.com/yannickl.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://cloud.githubusercontent.com/assets/798235/19212170/781ebb64-8d4c-11e6-8285-94e74a356d53.png\" alt=\"Reactions\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"http://cocoadocs.org/docsets/Reactions/\"\u003e\u003cimg alt=\"Supported Platforms\" src=\"https://cocoapod-badges.herokuapp.com/p/Reactions/badge.svg\"/\u003e\u003c/a\u003e\n  \u003ca href=\"http://cocoadocs.org/docsets/Reactions/\"\u003e\u003cimg alt=\"Version\" src=\"https://cocoapod-badges.herokuapp.com/v/Reactions/badge.svg\"/\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/Carthage/Carthage\"\u003e\u003cimg alt=\"Swift Package Manager\" src=\"https://img.shields.io/badge/SPM-%E2%9C%93-4BC51D.svg?style=flat\"/\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/Carthage/Carthage\"\u003e\u003cimg alt=\"Carthage compatible\" src=\"https://img.shields.io/badge/Carthage-%E2%9C%93-4BC51D.svg?style=flat\"/\u003e\u003c/a\u003e\n  \u003ca href=\"https://travis-ci.org/yannickl/Reactions\"\u003e\u003cimg alt=\"Build status\" src=\"https://travis-ci.org/yannickl/Reactions.svg?branch=master\"/\u003e\u003c/a\u003e\n  \u003ca href=\"http://codecov.io/github/yannickl/Reactions\"\u003e\u003cimg alt=\"Code coverage status\" src=\"http://codecov.io/github/yannickl/Reactions/coverage.svg?branch=master\"/\u003e\u003c/a\u003e\n  \u003ca href=\"https://codebeat.co/projects/github-com-yannickl-reactions\"\u003e\u003cimg alt=\"Codebeat badge\" src=\"https://codebeat.co/badges/69ae0ba9-21bf-4fc6-ba45-e21b1d26ac1a\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n**Reactions** is a fully customizable control to give people more ways to share their reaction in a quick and easy way.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://cloud.githubusercontent.com/assets/798235/19211779/1d4a4d68-8d45-11e6-9b0a-b58a0f4c78ed.gif\" alt=\"Reactions\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"#requirements\"\u003eRequirements\u003c/a\u003e • \u003ca href=\"#usage\"\u003eUsage\u003c/a\u003e • \u003ca href=\"#installation\"\u003eInstallation\u003c/a\u003e • \u003ca href=\"#contribution\"\u003eContribution\u003c/a\u003e • \u003ca href=\"#contact\"\u003eContact\u003c/a\u003e • \u003ca href=\"#license-mit\"\u003eLicense\u003c/a\u003e\n\u003c/p\u003e\n\n## Requirements\n\n- iOS 8.0+\n- Xcode 9.0+\n- Swift 4.2+\n\n## Usage\n\n### Reaction\n\n \u003cimg src=\"https://cloud.githubusercontent.com/assets/798235/19212812/1bc819f6-8d5a-11e6-81fc-555f02db2342.png\" alt=\"Reaction\" height=\"132px\"\u003e\n\nA `Reaction` object is a model defined with these properties:\n\n- *id:* a unique identifier.\n- *title:* the title displayed either in a selector or a button.\n- *color:* the color used to display the button title.\n- *icon:* the reaction icon.\n- *alternativeIcon:* the optional alternative icon used with the reaction button.\n\nThe library already packages the standard Facebook reactions: `like`, `love`, `haha`, `wow`, `sad` and `angry`. And of course you can create your owns:\n\n```swift\nlet myReaction = Reaction(id: \"id\", title: \"title\", color: .red, icon: UIImage(named: \"name\")!)\n```\n\n### ReactionSelector\n\n \u003cimg src=\"https://cloud.githubusercontent.com/assets/798235/19212442/8b9fe032-8d51-11e6-84c3-e2a026a31d72.png\" alt=\"ReactionSelector\" height=\"65px\"\u003e\n\nThe `ReactionSelector` control allows people to select a reaction amongst a list:\n\n```swift\nlet select       = ReactionSelector()\nselect.reactions = Reaction.facebook.all\n\n// React to reaction change\nselect.addTarget(self, action: #selector(reactionDidChanged), for: .valueChanged)\n\nfunc reactionDidChanged(_ sender: AnyObject) {\n  print(select.selectedReaction)\n}\n\n// Conforming to the ReactionFeedbackDelegate\nselect.feedbackDelegate = self\n\nfunc reactionFeedbackDidChanged(_ feedback: ReactionFeedback?) {\n  // .slideFingerAcross, .releaseToCancel, .tapToSelectAReaction\n}\n```\n\nThe component can be used alone (like above) or in conjunction with the `ReactionButton` (discussed later). You can of course customize the component using a `ReactionSelectorConfig` object:\n\n```swift\nselect.config = ReactionSelectorConfig {\n  $0.spacing        = 6\n  $0.iconSize       = 40\n  $0.stickyReaction = false\n}\n```\n\n### ReactionButton\n\n\u003cimg src=\"https://cloud.githubusercontent.com/assets/798235/19213727/b43341d4-8d73-11e6-9696-5f10dcf6815d.gif\" alt=\"ReactionButton\" height=\"32px\"\u003e\n\nA `ReactionButton` provides a simple way to toggle a reaction (e.g. like/unlike). A `ReactionSelector` can also be attached in order to display it when a long press is performed:\n\n```swift\nlet button      = ReactionButton()\nbutton.reaction = Reaction.facebook.like\n\n// To attach a selector\nbutton.reactionSelector = ReactionSelector()\n```\n\nYou can configure the component using a `ReactionButtonConfig` object:\n\n```swift\nbutton.config         = ReactionButtonConfig() {\n  $0.iconMarging      = 8\n  $0.spacing          = 4\n  $0.font             = UIFont(name: \"HelveticaNeue\", size: 14)\n  $0.neutralTintColor = UIColor(red: 0.47, green: 0.47, blue: 0.47, alpha: 1)\n  $0.alignment        = .left\n}\n```\n\n### ReactionSummary\n\n\u003cimg src=\"https://cloud.githubusercontent.com/assets/798235/19214415/709ff948-8d83-11e6-9155-1af925fb4dbe.png\" alt=\"ReactionSummary\" height=\"28px\"\u003e\n\nThe `ReactionSummary` is a control which display a given reaction list as a set of unique icons superimposed. You can also link it to a text description.\n\n```swift\nlet summary       = ReactionSummary()\nsummary.reactions = Reaction.facebook.all\nsummary.text      = \"You, Chris Lattner, and 16 others\"\n\n// As is a control you can also react to the .touchUpInside event\nselect.addTarget(self, action: #selector(summaryDidTouched), for: .touchUpInside)\n```\n\n\u003cimg src=\"https://cloud.githubusercontent.com/assets/798235/19440513/792e0b6c-9482-11e6-8410-c5522ca93fed.png\" alt=\"ReactionSummary Non Aggregated\" height=\"23px\"\u003e\n\nYou can also have the details for each reaction. For that you'll need to uncombined them by setting the `isAggregated` config property to `false`.\n\n```swift\nsummary.config = ReactionSummaryConfig {\n  $0.isAggregated = false\n}\n```\n\nLike the other components you can setting it using a `ReactionSummaryConfig` object:\n\n```swift\nsummary.config = ReactionSummaryConfig {\n  $0.spacing      = 8\n  $0.iconMarging  = 2\n  $0.font         = UIFont(name: \"HelveticaNeue\", size: 12)\n  $0.textColor    = UIColor(red: 0.47, green: 0.47, blue: 0.47, alpha: 1)\n  $0.alignment    = .left\n  $0.isAggregated = true\n}\n```\n\n## Installation\n\n#### CocoaPods\n\nInstall CocoaPods if not already available:\n\n``` bash\n$ [sudo] gem install cocoapods\n$ pod setup\n```\nGo to the directory of your Xcode project, and Create and Edit your *Podfile* and add _Reactions_:\n\n``` bash\n$ cd /path/to/MyProject\n$ touch Podfile\n$ edit Podfile\nsource 'https://github.com/CocoaPods/Specs.git'\nplatform :ios, '8.0'\n\nuse_frameworks!\npod 'Reactions', '~\u003e 3.0.0'\n```\n\nInstall into your project:\n\n``` bash\n$ pod install\n```\n\nOpen your project in Xcode from the .xcworkspace file (not the usual project file):\n\n``` bash\n$ open MyProject.xcworkspace\n```\n\nYou can now `import Reactions` framework into your files.\n\n#### Carthage\n\n[Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency manager that automates the process of adding frameworks to your Cocoa application.\n\nYou can install Carthage with [Homebrew](http://brew.sh/) using the following command:\n\n```bash\n$ brew update\n$ brew install carthage\n```\n\nTo integrate `Reactions` into your Xcode project using Carthage, specify it in your `Cartfile` file:\n\n```ogdl\ngithub \"yannickl/Reactions\" \u003e= 3.0.0\n```\n\n#### Swift Package Manager\n\nYou can use [The Swift Package Manager](https://swift.org/package-manager) to install `Reactions` by adding the proper description to your `Package.swift` file:\n```swift\nimport PackageDescription\n\nlet package = Package(\n    name: \"YOUR_PROJECT_NAME\",\n    targets: [],\n    dependencies: [\n        .Package(url: \"https://github.com/yannickl/Reactions.git\", versions: \"3.0.0\" ..\u003c Version.max)\n    ]\n)\n```\n\nNote that the [Swift Package Manager](https://swift.org/package-manager) is still in early design and development, for more information checkout its [GitHub Page](https://github.com/apple/swift-package-manager).\n\n#### Manually\n\n[Download](https://github.com/YannickL/Reactions/archive/master.zip) the project and copy the `Sources` and `Resources` folders into your project to use it in.\n\n## Contribution\n\nContributions are welcomed and encouraged *♡*.\n\n## Contact\n\nYannick Loriot\n - [https://21.co/yannickl/](https://21.co/yannickl/)\n - [https://twitter.com/yannickloriot](https://twitter.com/yannickloriot)\n\n## License (MIT)\n\nCopyright (c) 2016-present - Yannick Loriot\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyannickl%2Freactions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyannickl%2Freactions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyannickl%2Freactions/lists"}