ToastNotificationJs 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package ToastNotificationJs --version 1.0.0
                    
NuGet\Install-Package ToastNotificationJs -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ToastNotificationJs" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ToastNotificationJs" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="ToastNotificationJs" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add ToastNotificationJs --version 1.0.0
                    
#r "nuget: ToastNotificationJs, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package ToastNotificationJs@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=ToastNotificationJs&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=ToastNotificationJs&version=1.0.0
                    
Install as a Cake Tool

ToastNotificationJs - README English Version

ToastNotificationJs is a lightweight and simple toast notification component that can be easily used in both ASP.NET Core and classic ASP.NET MVC projects.

Features:

  • Lightweight and no dependencies on jQuery or other libraries
  • Usable in any project with HTML and JavaScript
  • Suitable for ASP.NET MVC 5 and ASP.NET Core
  • Customizable with CSS

Installation from NuGet: Use Package Manager: Install-Package ToastNotificationJs

Or using .NET CLI: dotnet add package ToastNotificationJs

File Structure:

  • For classic ASP.NET MVC: content/toastnotification/ (files added directly to the project)
  • For ASP.NET Core: wwwroot/toastnotification/ (files added inside wwwroot)

Usage:

  1. Add the files in your layout or page:

For ASP.NET MVC classic: <link rel="stylesheet" href="~/toastnotification/ToastNotification.css" /> <script src="~/toastnotification/ToastNotification.js"></script>

For ASP.NET Core: <link rel="stylesheet" href="~/toastnotification/ToastNotification.css" /> <script src="~/toastnotification/ToastNotification.js"></script>

Note: The path ~/toastnotification/ in ASP.NET Core should be inside wwwroot.

  1. Use in your HTML or JavaScript:

showToast("Operation completed successfully", "success");

Toast types available:

  • success
  • error
  • info
  • warning

Developer: Created and maintained by Kaveh Norozi GitHub Repository: https://github.com/kavehnorozi/ToastNotificationJs

License: MIT License

ToastNotificationJs یک کامپوننت سبک و ساده برای نمایش اعلان‌های toast است که به‌راحتی در پروژه‌های ASP.NET Core و ASP.NET MVC کلاسیک قابل استفاده است.

ویژگی‌ها:

  • سبک و بدون وابستگی به jQuery یا کتابخانه‌های دیگر
  • قابل استفاده در هر پروژه‌ای با HTML و JavaScript
  • مناسب برای ASP.NET MVC 5 و ASP.NET Core
  • قابل سفارشی‌سازی با CSS

نصب از NuGet: از طریق Package Manager: Install-Package ToastNotificationJs

یا با استفاده از .NET CLI: dotnet add package ToastNotificationJs

ساختار فایل‌ها:

  • برای ASP.NET MVC کلاسیک: content/toastnotification/ (فایل‌ها مستقیم به پروژه اضافه می‌شوند)
  • برای ASP.NET Core: wwwroot/toastnotification/ (فایل‌ها در wwwroot اضافه می‌شوند)

نحوه استفاده:

  1. اضافه کردن فایل‌ها در layout یا صفحه اصلی:

برای ASP.NET MVC کلاسیک: <link rel="stylesheet" href="~/toastnotification/ToastNotification.css" /> <script src="~/toastnotification/ToastNotification.js"></script>

برای ASP.NET Core: <link rel="stylesheet" href="~/toastnotification/ToastNotification.css" /> <script src="~/toastnotification/ToastNotification.js"></script>

توجه: مسیر ~/toastnotification/ در ASP.NET Core باید داخل wwwroot باشد.

  1. استفاده در HTML یا JavaScript:

showToast("عملیات با موفقیت انجام شد", "success");

انواع toast موجود:

  • success
  • error
  • info
  • warning

توسعه‌دهنده: ساخته و نگهداری شده توسط کاوه نوروزی مخزن گیت‌هاب: https://github.com/kavehnorozi/ToastNotificationJs

لایسنس: MIT License

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.0.1 154 6/2/2025
2.0.0 147 6/2/2025
1.0.1 149 5/29/2025
1.0.0 157 5/29/2025

Initial release: supports both ASP.NET Core (wwwroot-based projects) and ASP.NET MVC Classic (Script and Content folders). Includes CSS animations and simple configuration.