popupS

A simple way to display beautiful popupS.
×

Alert


×
Hello World!
   popupS.alert({
        content: 'Hello World!'
    });

Confirm


×
Continue?
   popupS.confirm({
        content: 'Continue?',
        onSubmit: function() {
                popupS.alert({
                        content: 'Great!'
                });
        }
    });

Prompt


×
What is your name?
   popupS.prompt({
        content: 'What is your name?',
        onSubmit: function(val) {
                popupS.alert({
                        content: 'Hi, ' + val + '!'
                });
        }
    });

Modal


×
   popupS.modal({
            content: '
' });

React implementation


×
   popupS.modal({
        onOpen: function() {
                React.render(
                        searchExample,
                        this.$contentEl
                );
        },
        onClose: function() {
                this.$layerEl.style.opacity = "0";
                React.unmountComponentAtNode(this.$contentEl);
        }
    });
Fork me on GitHub