Small web components with minimal or no aditional dependencies.
Here are some quick demonstrations.
Web component for displaying styled and animated messages.
NmdFlash.add("Hi!");
NmdFlash.add(
"This was a triumph.", // message
"success", // type
1000, // autodismiss
true // message contains HTML tags
);
let msg = document.querySelector("nmd-flash");
msg.type = "warning";
msg.messageText = "Nevermind, I'm a warning now.";
msg.dismiss();
Web component for modal dialog windows.
Put this somewhere:
Localize your buttons:
These return Promise:
NmdModal.alert("Hello there!");
NmdModal.alert("#$@&%*!", "fail");
let response = await NmdModal.prompt("Who's there?", "light");
if(response)
NmdModal.alert(`${response} who?`, "dark");
Searchable select web compoment with vanilla look and feel.
Hide and reveal your content easily and with style with this simple web component.