1.2.0 • Published 2 years ago

promptjs v1.2.0

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
2 years ago

Prompt

npm npm GitHub

A web app notification plugin to easily integrate and get going.

Demo

Documentation:

Install: npm install promptjs --save

Update: npm update promptjs --save

Update to the latest version of the library to catch up with new features.

Usage:

Import:

  1. If you're running this on reactjs/vuejs/angular sort of framework, you can directly use require. Alternatively, if you've browerify or requirejs in your project, you can import directly from node_modules:
require('promptjs')

Don't forget to add the stylesheet:

<link rel="stylesheet" href="/node_modules/promptjs/dist/prompt.css">
  1. If not, copy them to your client side vendor directory like:
cp -r node_modules/promptjs statics/vendor/

where statics is my client side static directory (Yours might have some equivalent name. Add accordingly). And then add these lines to your client side view or html file:

<link rel="stylesheet" href="/static/vendor/promptjs/dist/prompt.css">
<script type="text/javascript" src="/static/vendor/promptjs/dist/prompt.js"></script>

Trigger:

Prompt.create({
    title: "Title",
    text: "Text",
    type: "success",
    position: "top-right",
    timeout: "5000"  // 5s
});

Screenshot:


Contributions Welcome. Feel free to open an issue with a feature request or bug report and work on it. Assign it to yourself so that nobody else takes it up.


Inspired by VanillaToasts.

1.2.0

2 years ago

1.1.0

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago