This module provides a general-purpose emoji picker, with emojis segregated by category. See this file for an example of how to use the picker in your application!
Most of the messages are handled internally, but there are a couple that will be of interest to the parent module:
Toggle: Use this message in the parent to toggle the emoji picker on and off
Select: Catch this message in the parent to retrieve the selected emoji
When initializing the emoji picker, you'll need to provide a few configuration parameters.
offsetX: the horizontal offset from where the picker is declared
offsetY: the vertical offset from where the picker is declared
closeOnSelect: whether or not the close the picker after an emoji is selected
This is the function to call to initialize the emoji picker.
pickerConfig : PickerConfig
pickerConfig =
{ offsetX = -271
, offsetY = -410
, closeOnSelect = True
}
emojiModel : EmojiPicker.Model
emojiModel =
EmojiPicker.init pickerConfig
The internal state of the emoji picker.
Note: the
skinColorfield is not in use in the current version, but a future release may include a skin tone selector to switch between emoji variants.