All Projects → noru → Vue Easy Toast

noru / Vue Easy Toast

Licence: mit
A Toast widget for Vue 1 & 2

Projects that are alternatives of or similar to Vue Easy Toast

vue2-dialog
A mobile Vue plugin for VueDialog
Stars: ✭ 21 (-81.25%)
Mutual labels:  toast, vue2
V Dialogs
A simple and clean instructional dialog plugin for Vue2, dialog type including Modal, Alert, Mask and Toast
Stars: ✭ 121 (+8.04%)
Mutual labels:  toast, vue2
Vue Snotify
Vuejs 2 Notification Center
Stars: ✭ 755 (+574.11%)
Mutual labels:  toast, vue2
vue-toast
vue.js toast tips 提示文本 Vue1.0&2.0
Stars: ✭ 17 (-84.82%)
Mutual labels:  toast, vue2
Vue Toastr
Vuejs Toast : Plugin and Component Capability.
Stars: ✭ 93 (-16.96%)
Mutual labels:  toast, vue2
Pay School
一个付费课程的前端 基于 vue2.0+vuex+vue-router+vux
Stars: ✭ 97 (-13.39%)
Mutual labels:  vue2
F Render
f-render | 基于 ElementUI 的表单设计器
Stars: ✭ 1,387 (+1138.39%)
Mutual labels:  vue2
Quasar Sika Design
quasar-sika-design让世界没有难写的代码,Quasar Sika Design 是一个企业级中后台前端 / 设计解决方案,中后台管理模板,我们秉承 Ant Design 的设计价值观,致力于在设计规范和基础组件的基础上,继续向上构建,提炼出典型模板 / 业务组件 / 配套设计资源,进一步提升企业级中后台产品设计研发过程中的『用户』和『设计者』的体验。
Stars: ✭ 93 (-16.96%)
Mutual labels:  vue2
Windowshowdemo
Android 弹窗案例总结(仿淘宝弹窗 咸鱼菜单 筛选列表)
Stars: ✭ 95 (-15.18%)
Mutual labels:  toast
Vue2 Element
基于vue2 + vue-router2 + element-ui + vuex2 + fetch + webpack2 企业级后台管理系统最佳实践
Stars: ✭ 112 (+0%)
Mutual labels:  vue2
Desktoptoast
A library for toast notifications from desktop app
Stars: ✭ 105 (-6.25%)
Mutual labels:  toast
Android Appmsg
In-layout notifications. Based on Toast notifications and article by Cyril Mottier (http://android.cyrilmottier.com/?p=773).
Stars: ✭ 1,384 (+1135.71%)
Mutual labels:  toast
Vuedemo sell eleme
ele by vue2.x 🐧
Stars: ✭ 1,349 (+1104.46%)
Mutual labels:  vue2
Seppf
普兰能效平台开源版(前端)
Stars: ✭ 104 (-7.14%)
Mutual labels:  vue2
Vue3 Sfc Loader
Vue3 Single File Component loader for Vue2 and Vue3. Load .vue files directly from your html/js. No node.js environment, no (webpack) build step.
Stars: ✭ 95 (-15.18%)
Mutual labels:  vue2
Toaster
🍞 Toast for Swift
Stars: ✭ 1,511 (+1249.11%)
Mutual labels:  toast
Eagles
eagles for vue componets of silianpan
Stars: ✭ 95 (-15.18%)
Mutual labels:  vue2
Social
基于Vue的社区论坛项目
Stars: ✭ 102 (-8.93%)
Mutual labels:  vue2
Vue Cli Multipage Bootstrap
vue-cli-multipage-bootstrap demo with vue2+vue-router+vuex+bootstrap+markdown for learning vue2.0
Stars: ✭ 105 (-6.25%)
Mutual labels:  vue2
Lyf Vue
这是一个基于vue2开发在线商城前端
Stars: ✭ 100 (-10.71%)
Mutual labels:  vue2

Vue-Easy-Toast

Vue 1.x Vue 2.x

A toast plugin for vue/vue2.

DEMO

Note: Since 1.x.x, only Vue 2 is supported. For Vue 1 users please stick to version 0.x.x

Issue/PR is welcomed, I'll response as soon as possible.

Usage

install

npm install vue-easy-toast --save

Quickstart

// before start
import Toast from 'vue-easy-toast'

// or a lite version without inline css, then you have to style yourself or manually import 'vue-easy-toast.css'
import Toast from 'vue-easy-toast/dist/vue-easy-toast-lite.min.js'
require('vue-easy-toast/dist/vue-easy-toast.css') // optional

Vue.use(Toast)

// in your code
Vue.toast('Can I have everybody`s attention?')

// or
$vm.$toast('Let me give a toast to you all.')

// or with HTML Tags
$vm.$toast('Hi <strong>Jonh</strong>')

More

toast or $toast takes 2 parameter: (message, [options])

Options
Parameter Type Default Description
id string easy-toast-default Unique identifier globally. Use this to create multiple toasts with different setups.
parent string body Selector of the container (TODO, not ready yet, position is fixed to the window)
className string, array Self-defined class names to pass through. There are 3 pre-defined classes: et-info, et-warn,et-alert, to toast with different background color
horizontalPosition string right Position horizontal of toast. There are 3 pre-defined positions: left, right and center
verticalPosition string top Position vertical of toast. There are 2 pre-defined positions: top and bottom
duration number 5000 The duration one toast will last, in milliseconds
mode string override override or queue. If override, the last toast will forcibly flush previous
closeable boolean false true or false. If true, the toast can be closed manually
transition string fade Built-in transitions: fade, slide-[up/down/left/right]. See also Transitions
Styling

Besides minimum styling, vue-easy-toast try not to be opinionated about the appearance. It is a simply a div(class="et-wrapper") wrapped a span(class="et-content"). Apply your css freely with them or with your own classes passed in as className.

example
Vue.toast('Hi, there!', {
  id: 'my-toast',
  parent: '#toast-container',
  className: ['my-toast', 'toast-warning'],
  horizontalPosition: 'right',
  verticalPosition: 'top',
  duration: 3000,
  mode: 'queue',
  transition: 'my-transition'
})
TODO
  • font-awesome? emoji?

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].