Skip to content

Element and Global Notifications / Toasts with Pure / Vanilla / Native JavaScript. 使用原生 JavaScript 在视窗或元素的指定位置发送通知和提示。

License

Notifications You must be signed in to change notification settings

mantoufan/yzhanNotify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

yzhanNotify

npm npm bundle size npm GitHub license ie6+
Element and Global Notifications / Toasts with Pure / Vanilla / Native JavaScript
用原生 JavaScript 在视窗或元素的指定位置发送通知和提示 Compatible with IE6+ 支持八方向

DEMO

DEMO

DEMO Picture

Start

Node.js

npm i yzhannotify
import 'yzhannotify/css'
import YZhanNotify from 'yzhannotify'

Browser

<link href="https://cdn.jsdelivr.net/npm/yzhannotify@latest/docs/yzhannotify.css" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/npm/yzhannotify@latest/docs/yzhannotify.umd.cjs"></scirpt>

API

YZhanNotify({
  msg: 'hello world',
  position: 'top center', // All optional Values can be found in DEMO
  duration: '2500', // ms
  className: '', // Class of notify container 
  ele: document.getElementById('main'), // If ele is null, notify will be displayed globally
})

About

Element and Global Notifications / Toasts with Pure / Vanilla / Native JavaScript. 使用原生 JavaScript 在视窗或元素的指定位置发送通知和提示。

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published