Ad-rotator.js

A fast, light-weight and highly configurable JS library to rotate advertisements
NPM Version Build Status Coding Style Ad-rotator jsdelivr CDN Downloads maintained License Blazing Speed Donate

✴️ What is it ?

Ad-rotator.js is a simple, flexible, WAI-ARIA compliant ad rotation library progressively designed for high versatility and seamless integration with a wide range of products.


🌟 Features 🌟

  • 📦 Has 0 DEPENDENCIES and is written in pure JS (Typescript)
  • 🖼 Displays native advertisements (even to adblock users)
  • 🏋️‍♀️ A super light-weight library - < 3kb minzipped.
  • 📳 Supports completely responsive multiple Ad instances.
  • 🪝 Optional hooks/callbacks for analytics, statistics, logging, etc...
  • 🧲 Built-in support for sticky advertisements.
  • 💤 Lazy loads Ads for optimal performance.
  • 💻 Display device specific ads i.e. ads targeted towards mobile/desktop.
  • ⚖️ Assign weight/priority to Ad unit(s).
  • ⚜️ Optional Fallback Mode i.e. kicks in only when your primary Ad network fails (for example, due to an Adblocker)
  • ♿️ Fully WAI-ARIA compliant design pattern
  • 🎀 Framework agnostic! That means you are free to use it with any framework (React, Vue, Svelte, Angular, etc... you name it!)


🌐 Browser Support

Ad-rotator supports all major browsers.

IE / Edge
Edge
Firefox
Firefox
Chrome
Chrome
Safari
Safari
iOS Safari
iOS Safari
Brave
Brave
Samsung
Samsung
Opera
Opera
Opera Mini
Opera Mini
Electron
Electron
Last 2 versions Last 2 versions Last 2 versions Last 2 versions Last 2 versions Last 2 versions Last 2 versions Last 2 versions Last 2 versions Last 2 versions


📄 License

Ad-rotator.js is fully opensource and released under the MIT license.


Next
Install