notifyalert

1.0.5 • Public • Published

Notifyalert 🚀✨

notifyalert is a powerful, dependency-free notification package that works seamlessly in both the terminal and the browser! It allows developers to display colorful, customizable alerts in Node.js apps, browser pages, or Angular components — all without additional dependencies.

✨ Features

  • Terminal Notifications: Customizable messages with types: success, warning, danger, info
  • Browser Notifications: Stylish, positionable pop-ups
  • Fully Configurable: Control box size, borders, colors, and animation
  • Zero Dependencies
  • Compatible with Node.js (>=10), Angular, Vanilla JS, and React

📦 Installation

npm install notifyalert

📦 notifyalert Usage Guide

1️⃣ Terminal / Node.js

const { alert } = require('notifyalert');

alert({
  message: 'Operation Completed!',
  type: 'success', // Options: 'success', 'warning', 'danger', 'info'
  style: {
    border: 'double', // Options: 'single', 'double', 'round'
    padding: 1,
    margin: 1,
  },
  position: 'top', // Options: 'top', 'middle', 'bottom'
});

2️⃣ Browser / Angular / React

import { notifier } from 'notifyalert';

notifier({
  message: 'Welcome to notifyalert!',
  type: 'info', // Options: 'success', 'warning', 'danger', 'info'
  position: 'top-right', // Options: 'top-left', 'top-right', 'bottom-left', 'bottom-right'
  animation: 'slide', // Options: 'fade', 'slide', etc.
  style: {
    backgroundColor: '#4caf50',
    color: '#fff',
    fontSize: '16px',
  },
});

🛠️ Options

Option Description Default
message The notification text ''
type Type of notification (success, warning, danger, info) info
style Object to customize style (border, padding, colors) {}
position Position of notification (top, middle, bottom, top-left, etc.) middle
animation Entry animation in browser notifications (fade, slide, etc.) fade

🚀 Example in Angular

import { Component, OnInit } from '@angular/core';
import { notifier } from 'notifyalert';

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
})
export class AppComponent implements OnInit {
  ngOnInit() {
    notifier({
      message: 'Angular Notification Ready!',
      type: 'success',
      position: 'bottom-right',
      animation: 'fade',
    });
  }
}

/notifyalert/

    Package Sidebar

    Install

    npm i notifyalert

    Weekly Downloads

    0

    Version

    1.0.5

    License

    ISC

    Unpacked Size

    11.3 kB

    Total Files

    5

    Last publish

    Collaborators

    • npmdilip