You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- This package assumes it runs in the browser. I have taken many steps to prevent it from failing on the server, but still, it is recommended to only render the component on the client. See troubleshooting section for more information.
| lazyLoadEmojis | boolean |`false`| Controls whether the emojis are loaded lazily or not. |
63
-
| previewConfig | object |`{}`| Controls the preview of the emoji. See below for more information. |
64
-
| searchPlaceholder | string |`Search`| Controls the placeholder of the search input. |
65
-
| suggestedEmojisMode | string |`frequent`| Controls the suggested emojis mode. Possible values are `frequent` and `recent`. |
66
-
| skinTonesDisabled | boolean |`false`| Controls whether the skin tones are disabled or not. |
67
-
| searchDisabled | boolean |`false`| Controls whether the search is disabled or not. When disabled, the skin tone picker will be shown in the preview component. |
68
-
| skinTonePickerLocation | string |`SEARCH`| Controls the location of the skin tone picker. Possible values are `SEARCH` and `PREVIEW`. |
69
-
|`width`|`number`/`string`|`350`| Controls the width of the picker. You can provide a number that will be treated as pixel size, or your any accepted css width as string. |
70
-
| emojiVersion |`string`| - | Allows displaying emojis up to a certain version for compatibility. |
71
-
|`height`|`number`/`string`|`450`| Controls the height of the picker. You can provide a number that will be treated as pixel size, or your any accepted css height as string. |
72
-
| getEmojiUrl |`Function`| - | Allows to customize the emoji url and provide your own image host. |
| lazyLoadEmojis | boolean |`false`| Controls whether the emojis are loaded lazily or not. |
60
+
| previewConfig | object |`{}`| Controls the preview of the emoji. See below for more information. |
61
+
| searchPlaceholder | string |`Search`| Controls the placeholder of the search input. |
62
+
| suggestedEmojisMode | string |`frequent`| Controls the suggested emojis mode. Possible values are `frequent` and `recent`. |
63
+
| skinTonesDisabled | boolean |`false`| Controls whether the skin tones are disabled or not. |
64
+
| searchDisabled | boolean |`false`| Controls whether the search is disabled or not. When disabled, the skin tone picker will be shown in the preview component. |
65
+
| skinTonePickerLocation | string |`SEARCH`| Controls the location of the skin tone picker. Possible values are `SEARCH` and `PREVIEW`. |
66
+
|`width`|`number`/`string`|`350`| Controls the width of the picker. You can provide a number that will be treated as pixel size, or your any accepted css width as string. |
67
+
| emojiVersion |`string`| - | Allows displaying emojis up to a certain version for compatibility. |
68
+
|`height`|`number`/`string`|`450`| Controls the height of the picker. You can provide a number that will be treated as pixel size, or your any accepted css height as string. |
69
+
| getEmojiUrl |`Function`| - | Allows to customize the emoji url and provide your own image host. |
70
+
| categories |`Array`| - | Allows full config over ordering, naming and display of categories. |
71
+
| customEmojis |`Array<{names: string[], imgUrl: string, id: string}>`| - | Allows adding custom emojis to the picker. |
73
72
74
73
## Full details
75
74
@@ -145,6 +144,7 @@ import { SkinTones } from 'emoji-picker-react';
145
144
To only sort/omit categories, you can simply pass an array of category names to display:
146
145
147
146
- 'suggested',
147
+
- 'custom', - Hidden by default
148
148
- 'smileys_people',
149
149
- 'animals_nature',
150
150
- 'food_drink',
@@ -186,6 +186,45 @@ import { SkinTones } from 'emoji-picker-react';
186
186
187
187
*`getEmojiUrl`: `(unified: string, emojiStyle: EmojiStyle) => string` - Allows to customize the emoji url and provide your own image host. The function receives the emoji unified and the emoji style as parameters. The function should return the url of the emoji image.
188
188
189
+
## Custom Emojis
190
+
191
+
The customEmojis prop allows you to add custom emojis to the picker. The custom emojis prop takes an array of custom emojis, each custom emoji has three keys:
192
+
193
+
id: Unique identifier for each of the custom emojis
194
+
names: an array of string identifiers, will be used both for display, search and indexing.
0 commit comments