You can customize navigation icons using two methods. If both are used for the same category, the categories configuration takes precedence.
Method 1: Using the categoryIcons prop
Map Categories enum values to React nodes:
import EmojiPicker, { Categories } from 'emoji-picker-react';
<EmojiPicker
categoryIcons={{
[Categories.SUGGESTED]: <img src="recent.png" alt="Recent" />,
[Categories.SMILEYS_PEOPLE]: <MyCustomFaceIcon />,
}}
/>;
Method 2: Using the categories configuration array
Define the icon directly within the category object:
import EmojiPicker, { Categories } from 'emoji-picker-react';
<EmojiPicker
categories={[
{
category: Categories.SUGGESTED,
name: 'Recently Used',
icon: <img src="recent.png" alt="Recent" />,
},
{
category: Categories.SMILEYS_PEOPLE,
name: 'Smileys & People',
icon: <MyCustomFaceIcon />,
},
]}
/>;