Skip to content

A lightweight and themeable modal alert system for React, built with customization in mind. Supports classic layout, dark/light themes, and global config — ideal for confirmations, errors, success messages, and more.

License

Notifications You must be signed in to change notification settings

codx-ak/notify-bolt

Repository files navigation

Notify Bolt Logo

✨ Experience Notify Bolt in Action

npm version npm downloads license

A blazing-fast, customizable, and elegant modal notification system for React.

✨ Features

  • ✅ Easy to integrate
  • 🎨 Fully customizable (styles, icons, animations, etc.)
  • 🌗 Light & Dark mode support
  • ⚡ Zero dependencies
  • 💡 Built-in variants: classic, default
  • 🧩 Extendable global defaults with setNotifyDefaults
  • 🎥 Smooth modal animations
  • 🔄 Async handling with Promise (confirm, deny, dismiss)

📦 Installation

npm install notify-bolt
# or
yarn add notify-bolt
# or
pnpm add notify-bolt

🚀 Quick Usage

import { showNotify } from 'notify-bolt';

const handleClick = () => {
  showNotify({
    title: 'Delete this item?',
    message: 'This action is permanent. Do you wish to proceed?',
    variant: 'classic',
    mode: 'dark',
    status: 'warning',
    showConfirmButton: true,
    showCancelButton: true,
  })
    .then((result) => {
      if (result === 'confirm') {
        // ✅ User confirmed
      } else if (result === 'deny') {
        // ⚠️ User denied
      }
    })
    .catch(() => {
      // ❌ User dismissed
    });
};

🔧 Global Configuration

You can set defaults once and reuse them across all modals:

import { setNotifyDefaults } from 'notify-bolt';

setNotifyDefaults({
  mode: 'light',
  defaultSize: 'sm',
  animation: 'slide-up',
  confirmButtonText: 'Okay',
  cancelButtonText: 'Cancel',
  icons: {
    success: '✅',
    error: '❌',
    info: 'ℹ️',
  },
});

📜 License

MIT © codx-ak

About

A lightweight and themeable modal alert system for React, built with customization in mind. Supports classic layout, dark/light themes, and global config — ideal for confirmations, errors, success messages, and more.

Topics

Resources

License

Stars

Watchers

Forks