Skip to content
A custom component that adds a favicon and a badge that you can use to show for example number of unread messages
JavaScript HTML
Branch: master
Clone or download

Latest commit

kevmodrome
kevmodrome adds missing image
Latest commit d2220a9 Mar 25, 2020

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.gitignore
README.md
package-lock.json
package.json
rollup.config.js
screenshot.gif

README.md

svelte-favicon-badge

A custom component that adds a favicon and a badge that you can use to show for example number of unread messages, etc.

Example

ScreenShot

Usage

Simply import the component and add it to your markup. It's probably a good idea to only use one per page/route since there could be conflicts. The options are: count background color and href

<script>
	import Badge from "svelte-favicon-badge";
	let count = 0;
	let background = "#FF0000";
	let color = "#FFFFFF";
</script>

<Badge {count} {color} {background} href="favicon.png" />

Browser Support

Should support all modern browsers except Safari. Not tested in IE but is assumed not to work.

You can’t perform that action at this time.