Small library for manipulating desktop favicon.
- Chrome: ✅
- Edge: ✅
- Firefox: ✅
- Opera: ✅
- IE: ❌
- Safari: ❌ (Safari hides favicons)
- data: and canvas support
- GIF, JPEG, PNG, SVG and other browser-supported formats
- Ultra-small code size
npm install favorite-icon
import { Favicon } from 'favorite-icon';
Favicon.set('/my-icon.png');
Set the favicon with your own image.
import { Favicon } from 'favorite-icon';
Favicon.set('./image.png');
// or
Favicon.set('data:image/png;base64,...');
// or
const canvas = document.createElement('canvas');
//...
Favicon.set(canvas);
Reset the favicon.
import { Favicon } from 'favorite-icon';
// ...
Favicon.reset();
MIT License
Num. | Package | Demo | Version | Download |
---|---|---|---|---|
1. | ⭐ Favorite Icon | Demo | ||
2. | 📛 Favorite Icon Badge | Demo | ||
3. | 😃 Favorite Icon Emoji | Demo | ||
4. | Demo | |||
5. | ⏩ Favorite Icon Video | Demo | ||
6. | 🔴 Favorite Icon Dot | Demo | ||
7. | ⏱️ Favorite Icon Timeout Worker | Demo |