Skip to main content

HTML Example

Use @raytolfas/toastify in pure HTML.

Code

<!DOCTYPE html>
<html>
<head>
<title>Test Toastify</title>
<script src="node_modules/@raytolfas/toastify/dist/raytolfas-toastify.umd.js"></script>
<link rel="stylesheet" href="node_modules/@raytolfas/toastify/toastify.css">
</head>
<body>
<button onclick="RaytolfasToastify.toast({ message: 'Success!', type: 'success', duration: 3000, position: 'top-right', theme: 'light' })">Show Toast</button>
</body>
</html>

Features

  • Shows a toast with a progress bar.
  • Pauses on hover.
  • Closes on click.

See React Example.