Skip to content

A clean and simple sticky notification bar with dismiss button.

License

Notifications You must be signed in to change notification settings

gkogan/simple-sticky-bar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

simple-sticky-bar

Some times you just need a simple sticky bar at the top or bottom of your site to promote something, which people can click or dismiss. This is it.

This simple sticky bar will appear for site visitors at the top or bottom of their browser window. If the visitor clicks "X" to dismiss the bar, it will go away and stay away forever.

Ideas for usage:

  • Promote upcoming events and webinars.
  • Add a prominent call-to-action throughout your site.
  • Announce new features, news, or products.
  • Greet web visitors obnoxiously.

Pro-tips:

  • Change localStorage to sessionStorage and the bar will reappear with each new session, even after being dismissed.
  • Add the code to a template file to load this bar on every page and for easy editing.

Who made this?

Greg Kogan with help from this tutorial about content gating.

About

A clean and simple sticky notification bar with dismiss button.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published