{"id":2491,"url":"https://github.com/lojals/ReactionButton","last_synced_at":"2025-08-03T00:31:46.316Z","repository":{"id":37729771,"uuid":"52811903","full_name":"lojals/ReactionButton","owner":"lojals","description":"Since Facebook introduced reactions in 2016, it became a standard in several applications as a way for users to interact with content. ReactionButton is a control that allows developers to add this functionality to their apps in an easy way.","archived":false,"fork":false,"pushed_at":"2021-01-16T07:11:47.000Z","size":2263,"stargazers_count":311,"open_issues_count":4,"forks_count":42,"subscribers_count":10,"default_branch":"main","last_synced_at":"2024-11-24T09:35:06.434Z","etag":null,"topics":["control","darkmode","reactions","selector","swift","uikit"],"latest_commit_sha":null,"homepage":"","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/lojals.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}},"created_at":"2016-02-29T18:02:55.000Z","updated_at":"2024-05-10T22:47:20.000Z","dependencies_parsed_at":"2022-08-21T03:50:50.643Z","dependency_job_id":null,"html_url":"https://github.com/lojals/ReactionButton","commit_stats":null,"previous_names":["lojals/joemojiablebtn"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lojals%2FReactionButton","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lojals%2FReactionButton/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lojals%2FReactionButton/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lojals%2FReactionButton/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lojals","download_url":"https://codeload.github.com/lojals/ReactionButton/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228510709,"owners_count":17931752,"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":["control","darkmode","reactions","selector","swift","uikit"],"created_at":"2024-01-05T20:16:15.055Z","updated_at":"2024-12-06T18:30:30.734Z","avatar_url":"https://github.com/lojals.png","language":"Swift","funding_links":[],"categories":["UI"],"sub_categories":["Button"],"readme":"\u003cp align=\"center\"\u003e\n\u003ca href='#'\u003e\u003cimg src=\"https://user-images.githubusercontent.com/6756995/97817645-5e0a3780-1c63-11eb-85be-519f76fc2beb.png\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n\u003ca href='#'\u003e\u003cimg src=\"https://img.shields.io/badge/Language-%20Swift%20-FF00.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"http://cocoapods.org/pods/ReactionButton\"\u003e\u003cimg src=\"https://img.shields.io/cocoapods/v/ReactionButton.svg?style=flat\"\u003e\u003c/a\u003e\n\u003ca href=\"https://swift.org/package-manager/\"\u003e\u003cimg src=\"https://img.shields.io/badge/SPM-supported-FF00.svg?style=flat\"\u003e\u003c/a\u003e\n\u003cbr /\u003e\n\u003ca href=\"https://raw.githubusercontent.com/lojals/ReactionButton/main/LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/cocoapods/l/ReactionButton.svg?style=flat\"\u003e\u003c/a\u003e\n\u003ca href=\"http://cocoadocs.org/docsets/ReactionButton\"\u003e\u003cimg src=\"https://img.shields.io/cocoapods/p/ReactionButton.svg?style=flat\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003eSince Facebook introduced reactions in 2016, it became a standard in several applications as a way for users to interact with content. ReactionButton is a control that allows developers to add this functionality to their apps in an easy way.\u003c/p\u003e\n\n## Features\n- [x] Support of Dark Mode\n- [x] Customizable layout using `ReactionButtonDelegateLayout`\n- [x] Extensible DataSource for the control\n- [x] Layout support for scrolling interfaces (UICollectionView/UITableView)\n- [x] Codable initializer for usage on storyboards\n- [x] Events\n\n## Requirements\n* iOS 13.0+\n* Swift 5.0+\n\n## Installation\n\n* [Installation guide](https://github.com/lojals/ReactionButton/wiki/Installation-guide)\n\n## Usage\n\n### 1. Basic Instance\nThere are multiple ways to instantiate a `ReactionButton`, using a frame, storyboards, or an empty convenience initializer.\n\n#### Example Code\n\n```swift\nlet buttonSample = ReactionButton(frame: CGRect(x: 0, y: 0, width: 100, height: 100))\nbuttonSample.dataSource = self\nview.addSubview(buttonSample)\n```\n\n![Basic usage](https://user-images.githubusercontent.com/6756995/97816507-652d4780-1c5b-11eb-8479-0d003197b149.gif)\n\u003e Images from [Trump reactionpacks style](http://www.reactionpacks.com/packs/2c1a1e41-e9e9-407a-a532-3bfdfef6b3e6).\n\n### 2. Delegate\nThe `ReactionButton` has a delegate to communicate events of option selection, option focus, and cancel of actions. To use it, set the `ReactionButtonDelegate` conform as a delegate.\n\n```swift\nlet buttonSample = ReactionButton(frame: CGRect(x: 0, y: 0, width: 100, height: 100))\nbuttonSample.delegate = self\nview.addSubview(buttonSample)\n```\n![Delegate example](https://user-images.githubusercontent.com/6756995/97816887-4e3c2480-1c5e-11eb-9028-5fed1ed22458.gif)\n\u003e Images from [Trump reactionpacks style](http://www.reactionpacks.com/packs/2c1a1e41-e9e9-407a-a532-3bfdfef6b3e6).\n\n### 3. Custom layout instance\n`ReactionButton` allows customization of the layout with the help of `ReactionButtonDelegateLayout`. To use it, please conform to that protocol and set it as delegate (Same pattern as UICollectionView).\n\n```swift\nfunc ReactionSelectorConfiguration(_ selector: ReactionButton) -\u003e ReactionButton.Config {\n  ReactionButton.Config(spacing: 2,\n                        size: 30,\n                        minSize: 34,\n                        maxSize: 45,\n                        spaceBetweenComponents: 30)\n}\n```\nYou can custom your selector with the following variables, used in the\n\n![New](https://user-images.githubusercontent.com/6756995/97817123-0cac7900-1c60-11eb-8df3-09ba7c19908b.png)\n\n![sizes](https://i.imgur.com/yNfyP3c.png?1)\n\n## Author\nJorge Ovalle, jroz9105@gmail.com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flojals%2FReactionButton","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flojals%2FReactionButton","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flojals%2FReactionButton/lists"}