1.0.1 β€’ Published 5 years ago

vue-toast-me v1.0.1

Weekly downloads
-
License
ISC
Repository
github
Last release
5 years ago

vue-toast-me

πŸ’ͺ Amesome & πŸ€Έβ€β™€οΈ flexible toast component for Vue

Collection previews

notification

preview

error

preview

message

preview

award

preview

event

preview

activity

preview

Design previews

material

preview

hipster

preview

bubble

preview

Installation

npm install --save vue-toast-me

Usage

main.js

import Vue from "vue";
import VueToastMe from "vue-toast-me";

Vue.use(VueToastMe);

Params

Param nameDataValues allowed
designtype: String, default: 'material''material', 'hipster', 'bubble'
typetype: String, default: 'notification''notification', 'error', 'message', 'activity', 'award', 'event'
texttype: Stringany text you want to show in a toast
animation-typetype: String, default: 'to-bottom''to-bottom', 'to-top', 'to-right', 'to-left', 'appearing'
toast-shadowtype: Boolean, default: true
close-buttontype: Boolean, default: false
timertype: Number, default: 3000
positiontype: String, default: 'top right''top right', 'top left', 'bottom right', 'bottom left'

Use v-model directive to switch toast state


Example

<template>
   <vue-toast-me
       v-model="isToastShown"
       type="notification"
       animation-type="to-left"
       position="bottom right"
       :text="myText"
       :timer="timeout"
       :closeButton="true"
   ></vue-toast-me>
</template>

<script>
 ...
 data() {
   return {
       isToastShown: false,
       myText: 'Lorem ipsum dolor sit amet',
       timeout: 5000,
    }
 }

...

</script>

Enjoy!

License

MIT