tabky-js
v1.0.0
Published
A JS package for programatically manipulating your app's browser tab (favicon and title).
Downloads
4
Readme
About the library
tabky-js is a a convenience library for manipulating your app's favicon and title with full Typescript support.
You can use it to make your favicon / title dynamically react to what's happening on the page or make your app's favicon / title more noticeable when the user is not focused on your app's tab.
What this library is?
- A way to add micro-interactions to your app, by dynamically changing the favicon and title depending on user's actions.
- A way to reflect your app's state in the favicon and title (by adding badges / notification icons to the favicon or changing the title to indicate some state to the user, i.e. "You have 1 new message").
- A way to changing the title / favicon when user tabs away from your app, to make your app more noticeable.
What this library isn't?
- A way to add animations to your favicon.
- A way to add a video to your favicon.
- A way to annoy your users.
Installation
npm install tabky-js
Usage / API / Documentation
Typescript support
This library is written in Typescript and has full Typescript support. It's also bundled with JSDoc comments, so you should have full intellisense support in your IDE regardless.
Browser support
Works in all major browsers except Safari (Swapping favicons dynamically does not work on Safari (see https://stackoverflow.com/a/66099108/)13363739).
Also while it should work on mobile browsers, it less useful there as the browser tab (favicon + title) isn't really visible to user all the time.
License
Distributed under the MIT License. See LICENSE
for more information.
Changelog
Contact
Created / maintained by Ivan Grginov @MetarDev