The iOS Aroma EmojiPicker package provides an emoji picker with support for light and dark mode as well as customizable colors.
This component requires minimum iOS 14.
To install the Swift Package, go to Project > Package Dependencies > + > Search or Enter Package URL > Fill in:
https://github.com/Coffee-IT-Development/EmojiPicker-iOS-Component
Add CITEmojiPicker
to a view. Then if the view does not automatically ignore the keyboard, also add the .ignoresSafeArea(.keyboard)
viewModifier.
To get the unicode of an emoji use: emoji.unicode
There is an intializer to use custom colors for the emoji picker. One or more of the colors used in the package can be overriden with your own custom color. If you want to support dark mode simply add this to your custom color.
import CITEmojiPicker
import SwiftUI
struct CITEmojiPickerExampleView: View {
@State private var emoji = "😄"
var body: some View {
VStack {
Text(emoji)
.frame(maxHeight: .infinity)
CITEmojiPicker { emoji in
self.emoji = emoji.emoji
}
}
.ignoresSafeArea(.keyboard)
}
}
/// The background color of the search bar and the category bar.
public var searchAndCategoryBackground: Color
/// The background color of the selected category within the pincode cells.
public var selectedCategoryBackground: Color
/// The background color of the emoji picker.
public var sheetBackground: Color
/// The color of the text in the search bar and the category names.
public var textColor: Color
Look at our other repositories on our GitHub account.
All notable changes to this project will be documented in the Changelog.
CITEmojiPicker
adheres to Semantic Versioning.
Do you have questions, ideas or need help? Send us an email at contact@coffeeit.nl.
Distributed under the MIT License. See LICENSE for more information.