Narcissistic Preening Monarch

    favorite-icon-dot
    TypeScript icon, indicating that this package has built-in type declarations

    0.5.1 • Public • Published

    🔴 Favorite Icon Dot

    NPM version NPM downloads Bundlephobia

    A small library for dot manipulating in favicon.

    Installation

    npm install favorite-icon-dot

    Demo

    Using

    import FaviconDot from 'favorite-icon-dot';
     
    const dot = new FaviconDot();
     
    dot.show();

    Advanced settings

    import Favicondot from 'favorite-icon-dot';
     
    const dot = new FaviconDot({
        backgroundColor: '#ff0000',
        radius: 5,
        strokeColor: '#000',
        faviconSrc: '/my-icon.png',
        positionX: 'right',
        positionY: 'bottom'
    });
     
    dot.show();

    API

    .show()

    Show dot in favicon.

    import FaviconDot from 'favorite-icon-dot';
     
    const dot = new FaviconDot();
     
    dot.show(count);

    .hide()

    Reset the favicon.

    import FaviconDot from 'favorite-icon-dot';
     
    const dot = new FaviconDot();
     
    // ...
     
    dot.hide();

    Browser support

    • Chrome: ✅
    • Firefox: ✅
    • Opera: ✅
    • IE: ❌
    • Edge: ❌
    • Safari: ❌ (Safari hides favicons)

    License

    MIT License

    Install

    npm i favorite-icon-dot

    DownloadsWeekly Downloads

    9

    Version

    0.5.1

    License

    MIT

    Unpacked Size

    25.3 kB

    Total Files

    8

    Last publish

    Collaborators

    • hcodes