Get started with notyf CDN

MIT licensed

Notyf is a lightweight library for creating browser notifications.

Tags:
  • javascript
  • plugin
  • notification
  • toast
  • notify

Stable version

Copied!

How to start using notyf CDN


<!DOCTYPE html>
<html>
<head>
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/notyf@3.1.6/notyf.min.css">
  <script src="https://cdn.cdnhub.io/notyf/3.10.0/notyf.min.js"></script>
  <title>Get started with notyf CDN - cdnhub.io</title>
</head>
<body>
  <button id="show-notification">Show Notification</button>

  <script>
    const notyf = new notyf('body', {
      types: ['info', 'success', 'warning', 'error'],
      dismissQueue: false,
      layout: 'topRight',
      theme: 'material'
    });

    document.getElementById('show-notification').addEventListener('click', () => {
      notyf.info('This is an info notification.');
    });
  </script>
</body>
</html>
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!

All versions