notiflix / Notiflix

Notiflix is a pure JavaScript library for client-side non-blocking notifications, popup boxes, loading indicators, and more that makes your web projects much better.
https://notiflix.github.io
MIT License
635 stars 55 forks source link

change default notify icon #38

Closed alimatinfar closed 3 years ago

alimatinfar commented 3 years ago

hello how can i change the default notify icon ?

furcan commented 3 years ago

Hi @alimatinfar ,

You can init/call the Notify module like an example below to use custom icons. (font-awesome or the equivalent web fonts)

Notiflix.Notify.success(
  'Message...',
  {
    useIcon: true, // default is true
    useFontAwesome: true, // default is false
    success: {
      fontAwesomeClassName: 'fab fa-github', // font-awesome icon class name...
    },
  },
);

Also, you can take a look at the all other options as well. https://github.com/notiflix/Notiflix#notiflix-notify-module-default-options

Thanks, Furkan.