Custom Icons

If the icons built in to Emoji Button don't go well with your app's look and feel, you can supply your own icons for:

  • The search icon
  • The clear search icon
  • The category icons
  • The "not found" icon

To use custom icons, pass the icons picker option and an object with one or more of the following properties:

  • search: Shown in the search bar when there is no search text entered.
  • clearSearch: Shown in the search bar when there is search text entered.
  • notFound: Shown along with a "not found" message when a search yields no emojis.
  • categories: A nested object mapping category IDs to their custom icons. The valid category IDs are:
    • recents
    • smileys
    • people
    • animals
    • food
    • activities
    • travel
    • objects
    • symbols
    • flags
    • custom
import { EmojiButton } from '@joeattardi/emoji-button';

const picker = new EmojiButton({
  icons: {
    search: '/search.svg',
    clearSearch: '/close.svg'
  }
});