No More Dependencies

Small web components with minimal or no aditional dependencies.

Here are some quick demonstrations.

nmd-flash npm

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();

nmd-modal npm

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");

nmd-select npm

Searchable select web compoment with vanilla look and feel.

nmd-collapse npm

Hide and reveal your content easily and with style with this simple web component.

mole 1
with default animation and duration (0.5s)
mole 2
with custom duration and same animation as before just set explicitly
mole 3
poor mole...