Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/eastriverlee/nativeemojipicker

SwiftUI emoji picker that uses native emoji keyboard
https://github.com/eastriverlee/nativeemojipicker

emoji genmoji ios swift swiftui

Last synced: 1 day ago
JSON representation

SwiftUI emoji picker that uses native emoji keyboard

Awesome Lists containing this project

README

        

# NativeEmojiPicker

this little SwiftUI library is an emoji picker.

it uses native emoji keyboard that apple gave us,
instead of other emoji pickers that are missing important features such as:
- multilingual emoji search
- **genmoji** support

Screenshot 2025-01-15 at 00 41 09

## example
```swift
import SwiftUI
import NativeEmojiPicker

struct EmojiPicker: View {
@State var isPresented: Bool = false
@State var emoji: String? = "🤯"
@State var genmoji: NSAttributedString? = nil
var hasNothing: Bool { emoji == nil && genmoji == nil }

var body: some View {
Button(action: { isPresented.toggle() }) {
ZStack {
Color.gray.opacity(0.1)
Image(systemName: "circle.dashed")
.padding(2)
.foregroundStyle(.gray)
.opacity(hasNothing ? 0.4 : 0)
EmojiView(emoji, genmoji)
}
.clipShape(.circle)
}
.frame(width: 40, height: 40)
.nativeEmojiPicker(
isPresented: $isPresented,
selectedEmoji: $emoji,
selectedGenmoji: $genmoji
)
}
}
```

## features
- closes down when user types non emoji key
- closes keyboard when user changes language (however it's also triggered by emoji search, so it's turned off by default)
- multilingual emoji search
- genmoji support (simulator is not supported as of now; Jan 2025)
- all emojis with all color combinations
- all future emojis
- simple and small codebase