Skip to content

Bring interaction to your UIView: emoji reactions and a dynamic context menu.

License

Notifications You must be signed in to change notification settings

ikhaled-ali/EmojisReactionKit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EmojisReactionKit

EmojisReactionKit πŸ‘πŸΌ ❀️ πŸ˜‚ πŸ‘ŒπŸΌ

A modern, lightweight drop-in replacement for iOS context menus β€” with emoji reactions, animated transitions, haptic feedback, and full theme customization. Perfect for messaging apps, comments, or any UI that could benefit from emoji-based interaction.

Built from scratch to offer a familiar yet customizable interaction β€” ideal for chat interfaces, social feeds, and interactive content.

swift support SwiftPM Compatible Platform

✨ Features

  • 🧩 Attach to any UIView β€” just call .react(...)
  • 🎨 Customizable UI:
    • Show/hide emoji reactions
    • Show/hide Menu actions
  • πŸ’¬ Smart gesture handling:
    • Works with any guester you want
    • Pan-to-select emoji or action with haptic feedback
  • πŸ’₯ Smooth transitions
  • πŸ› οΈ Fully themeable β€” light/dark styles, blur options, more icon etc.

πŸ“· Preview

EmojisReactionKit EmojisReactionKit


βš™οΈ Requirements

  • iOS 13+

πŸ“¦ Installation

Use Swift Package Manager:

In Xcode:


πŸ› οΈ Usage

Full Reaction + Menu

import EmojisReactionKit

let reactConfig = ReactionConfig(
 itemIdentifier: indexPath,
 emojis: ["πŸ‘πŸΌ", "πŸ˜‚", "❀️", "πŸ‘ŒπŸΌ"],
 menu: UIMenu(title: "", children: [
     UIAction(identifier: "reply", title: "Reply", image: UIImage(systemName: "arrowshape.turn.up.left")) { _ in // ⛔️ Keep it empty and Handle action in delegate! 
     }
 ]),
 startFrom: .center
)

reactionPreview = yourView.react(with: reactConfig, delegate: self)

Only Emoji Reaction?

ReactionConfig(
    itemIdentifier: indexPath,
    emojis: ["πŸ‘πŸΌ", "πŸ˜‚", "❀️", "πŸ‘ŒπŸΌ"]
)
yourView.react(with: config, delegate: self)

🧩 Delegate

func didDismiss(on identifier: Any, action: UIAction?, emoji: String?, moreButton: Bool) {
    if let emoji = emoji {
        print("User reacted with: \(emoji)")
    } else if let action = action {
        print("User selected action: \(action.identifier)")
    }else if moreButton {
        print("more button clicked")
    }
}

For detailed examples, check out the example project included in the repository.

πŸ“š FAQ

  • Does it support RTL layouts? βœ… Yes, RTL is supported out of the box.
  • Can I disable the emoji reaction or menu? βœ… Yes. Just pass an empty emojis array or set menu: nil.
  • How do I theme it? Use the ReactionTheme to customize blur, background, and icon appearance.

πŸ“„ License

MIT License. See LICENSE for more info.

😎 Author

Made with ❀️ by iKʜAʟED〆

About

Bring interaction to your UIView: emoji reactions and a dynamic context menu.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages