# x-toast

> 轻量化的全局提示插件

Latest version **1.0.4** (published 2017-09-28) · ISC license · 0 weekly downloads

## Install

```sh
npm install x-toast
pnpm add x-toast
yarn add x-toast
bun add x-toast
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.4 |
| Published | 2017-09-28 |
| First published | 2017-09-26 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | xiecp |
| Maintainers | xiecp |
| Keywords | toast |

## Links

- npm: https://www.npmjs.com/package/x-toast
- npm.io page: https://npm.io/package/x-toast

## Alternatives

- [update-check](https://npm.io/package/update-check.md) — 4.0M weekly downloads
- [react-native-onesignal](https://npm.io/package/react-native-onesignal.md) — 134.5K weekly downloads
- [react-redux-toastr](https://npm.io/package/react-redux-toastr.md) — 33.7K weekly downloads
- [@nocobase/plugin-notification-manager](https://npm.io/package/@nocobase/plugin-notification-manager.md) — 2.0K weekly downloads
- [react-simple-toasts](https://npm.io/package/react-simple-toasts.md) — 1.9K weekly downloads

## Recent versions

- 1.0.4 (latest) — 2017-09-28
- 1.0.3 — 2017-09-27
- 1.0.2 — 2017-09-26
- 1.0.1 — 2017-09-26
- 1.0.0 — 2017-09-26

## README

### 轻量化的全局提示插件

#### 安装
npm i -S x-toast
#### 使用示例
```
let xToast = require('x-toast')
//或者
//import xToast from 'x-toast'

xToast('这个是最简单的提示')

xToast.info('info提示')

xToast.error('error提示')

xToast.warning('warning提示')

xToast.success('success提示')

xToast.loading('loading提示')

//同样支持
xToast({
  msg:'这个是最简单的提示',
  type:'info'
})
```
#### 可配置项(待完善)
// 默认参数
```
{
  msg: '提示信息',
  duration: 2500,//自动关闭时间
  closable: false,//是否显示关闭图标
  closableSize: '8px',
  closableWidth: '1px',
  type: 'default',//提示类型
  translateY: '40px',
  minWidth: '70px',
  maxWidth: '200px',
  backgroundColor: '',
  textColor: '#fff',
  loadingSize: '15px',
  loadingBorderSize: '2px',
  autoClose: true,//是否自动关闭
  style:{}
}
```

---
_Source: https://npm.io/package/x-toast · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
