Smoke.js - Javascript Alert System Replacement

Written by Kevin Liew on 22 Mar 2012
34,683 Views • Javascript


Smoke.js is a replacement of browser's default alert system for Javascript. If you want to standardize Javascript alert box across different browsers and platforms, Smoke.js is the plugin you are looking for. Smoke.js is a lightweight and flexible Javascript plugin that does just that - replace the existing alert, confirm, prompt and a new addition - signal which display an alert box and hide it after a few seconds. It's fully made with HTML and CSS3 so you will able to style it up and make a custom alert box that visually matched with your website.


  • Signal: Message appear for a few seconds
  • Alert: Normal alert box
  • Confirm: Alert box with Yes & No buttons
  • Prompt: Alert box with input field.
  • Support callback event
  • Lightweight, and easy to skin
  • Work on all browsers including Mobile platform (IE6 usable, no animation)



smoke.alert('This is a normal alert... nothing fancy', {}, function(){
	// oh what now?


smoke.confirm('You are about to destroy everything. Are you sure?',function(e){
	if (e){
		smoke.alert('OK pressed');
		smoke.alert('CANCEL pressed');


smoke.prompt('what\'s my name?',function(e){
	if (e){
		smoke.alert('my name is '+e);


smoke.signal('this goes away after a few seconds... 5 seconds in fact');


  • Official Website / Demo / Download
  • Plugin Category: Form
  • Requirement: CSS3 Support
  • Compatibility: Most Browsers including IE6 (Except CSS3 Visual Effect)
  • License: MIT License
Join the discussion

Comments will be moderated and rel="nofollow" will be added to all links. You can wrap your coding with [code][/code] to make use of built-in syntax highlighter.

Hasmukh 10 years ago
Hi, Prompt & alert together one behind the other gives me an error of undefined on the latter...Any help on this? great plugin..
Frankie Kam 10 years ago
Fantastic/ My project went by leaps and bounds after I discovered your post! Was trying other JQuery alert s/w with little success. Smoke.js is so easy to use. Thank you, thank you.
Carl 10 years ago
Thanks, was looking all over for a non-jquery solution.