A Simple Material Design Dialog Plugin In Pure JavaScript | duDialog

Simple materials concept dialogue extension (no jQuery required, no coding required). duDialog is a pure JavaScript plugin for creating Material Design impressed alert, confirmation, choice dialog popups with no dependencies.

full screen dialog android material design, material ui dialog, angular material dialog, custom material dialog android github, material ui dialog example, angular material dialog example

How to make use of it:

1. To get began, insert the duDialog’s JavaScript and CSS records data into the web page.

<script src="duDialog.js"></script>

2. Create a fundamental alert dialog with an OK button.

new duDialog('Alert Message', 'This is an alert message.');

3. Create an affirmation dialog with callbacks.

new duDialog('Confirm Dialog', 'Are You SUre', duDialog.OK_CANCEL, { 
    okText: 'Confirm',
    callbacks: {
      okClick: function(){
        // do something
      cancelClick: function(){
        // do something
new duDialog('Select An Item', ['', '', ''], {
  selection: true, 
  callbacks: {
    itemSelect: function(e, item){
      // this.value

// or
new duDialog('Select An Item', 
    [{ name: '', id: 1 }, { name: '', id: 2 }, { name: '', id: 3 }], 
    selection: true,
    textField: 'name',
    valueField: 'id',
    callbacks: {
      itemSelect: function(e, i){
        // this.value

4. All optionally available settings with default values.

okText: 'Ok', 
cancelText: 'Cancel',
selection: false, // enables item selection
multiple: false, // enables multiple selection
selectedValue: null, // preselected values
valueField: 'value', // field name
textField: 'item',  // field name
callbacks: null // callbacks

Modern Material Design Dialog Generator, Material Design Dialog Box, Alert Dialog Material Design, android dialog example, android popup dialog example

See Demo And Download

Official Website(dmuy): Click Here

This superior jQuery/javascript plugin is developed by dmuy. For extra Advanced Usages, please go to the official website.

Related Posts


How to Create a Simple Cookie Banner Consent Using Bootstrap 4

Cookie Consent Popup Javascript – Quick and simple tutorial for creating a simple Bootstrap cookie banner. If you have a website or blog with people visiting or…


Create Custom HTML Terminals With Pure JavaScript | shell.js

Custom HTML Terminals is A JavaScript library to create HTML terminals on web pages. The shell js JavaScript library offers a straightforward method to create Ubuntu, OS X,…


Bootstrap Alert, Confirm, and Flexible Dialog Boxes | Bootbox

Bootbox.js is a small JavaScript library that allows you to create programming dialogs using Bootstrap templates, without having to worry about creating, managing, or removing any required…


An Accessible Touch-enabled Slider Web Component | fg-carousel

fg-carousel Slider – A simple & modern slider web component to create versatile, accessible, touch-enabled picture carousels utilizing CSS scroll snap, Custom Element, and Intersection Observer API….


A Lightweight and Efficient Tags Input Component in Vanilla JS | tagify

tagify transforms an input field or textarea into a tags component, in an easy and customizable way, with great performance and a small code footprint, full of…


A Lightweight Library to Copy Text to Clipboard | CopyJS

CopyJS is a lightweight JavaScript library that allows you to copy plain text or HTML content to the clipboard. Must Read: Tiny Library for Copy Text In…