0.1.0-canary.1 • Published 11 months ago
@moaqz/toast v0.1.0-canary.1
Event-based toast notification component.
Install
# Using npm
npm install @moaqz/toast
# Using yarn
yarn add @moaqz/toast
# Using pnpm
pnpm add @moaqz/toast
Usage
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Example</title>
</head>
<body>
<moaqz-toaster data-position="bottom-right"></moaqz-toaster>
</body>
</html>
import "@moaqz/toast";
dispatchEvent(new CustomEvent("moaqz-toaster:create", {
detail: {
message: "Your message here",
type: "success", // or 'error', 'info', 'warning'
description: "Optional description here"
}
}));
License
MIT License
0.1.0-canary.1
11 months ago