@ -51,6 +51,15 @@ The picker is shown by calling `showPicker` or `togglePicker` on the `EmojiButto
});
```
## Custom emojis
Emoji Button supports a custom emojis category. A custom emoji is an image file that is added to the picker. For best results, a custom emoji should be a square image.
A custom emoji is defined as an object with the following properties:
* `name`: The display name of the custom emoji.
* `emoji`: The URL of the image to use for the custom emoji.
### TypeScript note
Because the `EmojiButton` class is a default export, it requires a small tweak to import the library in a TypeScript project. There are two options:
@ -83,6 +92,8 @@ Creates an Emoji Button emoji picker.
* `symbols`
* `flags`
* `custom`: (object[]): An array of custom emojis to include in the "Custom" category.
* `emojiSize`: (string, default: `1.8em`) The size to use for the emoji icons.
* `emojisPerRow`: (number, default: `8`) The number of emojis to display per row. If this is set to a number smaller than 6, some category buttons may be cut off, so it is advisable to set `showCategoryButtons` to `false`.
@ -158,7 +169,8 @@ Creates an Emoji Button emoji picker.