pop-message
v2.0.1
Published
A basic package to display messages and get input from users
Downloads
50
Maintainers
Readme
pop-message
A simple npm package for displaying messages, confirming actions, and getting input from users. Best for small projects and basic validation. https://www.npmjs.com/package/pop-message
npm install pop-message
Examples
Live example: https://alex-vdboogaard.github.io/pop-files/
Simple popups
simplePop("success", "Welcome new user!") //success message
simplePop("error", "Something went wrong") //error message
Confirm actions
const bool = await confirmPop("Are you sure you want to delete this?") //returns true or false after Promise resolves
[!IMPORTANT] Remember to wrap this in an async function
Get user input
const name = await inputPop("What's your name?") //returns user input as string after Promise resolves
[!IMPORTANT] Remember to wrap this in an async function