Get Started
Learn how to configure settings for Prompt, such as your syntax highlighting preference and the default saving folder location.
Installation
$ npm install prompt --save
Configuration
Parameter | Description | Default |
---|---|---|
title | Title of the Notification | null |
text | Text of the notification. Usually can be used to add more descriptive message to the title | null |
type | Type of Notification. Ex: success, info, warning, error. | default |
position | Position of where you'd want the notification to come at. | Top Right |
timeout | Timeout till the notification disappears from view. If given empty, it'll not disappear unless clicked on it. | ∞ |
Usage
First you need import the library files to your client base.
<link rel="stylesheet" href="/node_modules/promptjs/dist/prompt.css">
<script src="/node_modules/promptjs/dist/prompt.js"></script>
Prompt.create({
title: "Title",
text: "Notification Text",
type: "success",
position: "top-right",
timeout: 3000
});
Issues
If you are facing any issues, feel free to open an issue on the Github Issue Tracker. Make sure to go through existing issues in case your concern is shared by others as well.