0.2.4 • Public • Published

Electron Statusbar

Adds a status bar to Electron
Please note: If you do not include this in your electron project in the correct way it will either not do anything or tell you that 'document' is undefined


On the page you want your statusbar on add the following code anywhere and remember to add const electron-statusbar = require("electron-statusbar") to your main javascript file and the html file you want the statusbar on.

    <div id="statusbar">
        <p id="statustext"></p>

The scripts will automatically add the styles and make it stay at the bottom of the screen for you but if you add styles to the div's it will use yours not the default and remember to add visibility: hidden to the styles (please remember to not change the name of the div's or the script wont be able to find them)
Then to change the statusbar, hide it, show it and much more you could do something like

const es = require("electron-statusbar")
es.setStatus("The application loaded", 6000, normal);
// This will show the statusbar and say "The application loaded" for 6
// seconds and the style of status will be normal

functions and commands

(presuming you used const es = require("electron-statusbar"))

  • es.setStatus([message], [timeInMilliseconds], [type: normal, error, succeeded]) - Shows the statusbar with the message for the amount of time and type of status given (you dont need to specify the time or type since the default is 6 seconds (6000 milliseconds) and a normal statusbar but you do however need to give a message or it will just show "electron-statusbar by floffah" also if you wan't to put a type but not a time it will send an error because you need to specify a number)
  • es.showStatus() - Shows the statusbar and if you have already done es.setStatus it will show that again
  • es.hideStatus() - to be used if you have just showed the statusbar
  • es.inject() - If you do not use this anywhere in your code the statusbar will not show unless you use this (reccomended to be used in the on ready event)
  • es.stop() - will stop the statusbar so none of the commands above apart from inject will work until you use es.inject() again

    I will add more soon if you request it but this is all i can think of for now!

Support me

follow me on Twitter, subscribe to me on YouTube and visit my website

Package Sidebar


npm i electron-statusbar

Weekly Downloads






Unpacked Size

10.1 kB

Total Files


Last publish


  • floffah