/simple-modal-es6

A simple modal with minimal styles and fixed positioning. Modal close is trigged by a background or close button click, or pressing the ESC key.

Primary LanguageJavaScript

Simple Modal ES6

npm version

Current Beta Testing (Not Production Ready)

A simple modal with minimal styles and fixed positioning. Modal close is trigged by a background or close button click, or pressing the ESC key.

Installation

$ npm install simple-modal-es6

Basic Usage

import SimpleModal from 'simple-modal-es6';

SimpleModal.open('<h1>Hello World</h1>');

SimpleModal.close();

Options

At this time there are no options.

To Do

  1. Add callback after open/close.
  2. Add option to exclude default close button.

Goal

Create the most minimal, developer friendly modal possible.