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

Notifications You must be signed in to change notification settings

kevmodrome/svelte-favicon-badge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Quick Start

Install via npm i svelte-favicon-badge and 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.

About

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published