https://github.com/mantoufan/yzhannotify
Element and Global Notifications / Toasts with Pure / Vanilla / Native JavaScript. 使用原生 JavaScript 在视窗或元素的指定位置发送通知和提示。
https://github.com/mantoufan/yzhannotify
notify yzhan1kb
Last synced: about 1 year ago
JSON representation
Element and Global Notifications / Toasts with Pure / Vanilla / Native JavaScript. 使用原生 JavaScript 在视窗或元素的指定位置发送通知和提示。
- Host: GitHub
- URL: https://github.com/mantoufan/yzhannotify
- Owner: mantoufan
- License: mit
- Created: 2022-08-04T09:26:14.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-08-08T17:07:51.000Z (almost 4 years ago)
- Last Synced: 2024-12-12T08:44:28.198Z (over 1 year ago)
- Topics: notify, yzhan1kb
- Language: CSS
- Homepage: https://mantoufan.github.io/yzhanNotify/
- Size: 17.6 KB
- Stars: 41
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# yzhanNotify



[](https://github.com/mantoufan/yzhanNotify/blob/main/LICENSE)

Element and Global Notifications / Toasts with Pure / Vanilla / Native JavaScript
用原生 JavaScript 在视窗或元素的指定位置发送通知和提示 Compatible with IE6+ 支持八方向
## DEMO
[DEMO](//mantoufan.github.io/yzhanNotify/)

## Start
### Node.js
```javascript
npm i yzhannotify
import 'yzhannotify/css'
import YZhanNotify from 'yzhannotify'
```
### Browser
```html
```
## API
```javascript
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
})
```