1. vue-toast-mobile
A mobile toast component for vue.js
vue-toast-mobile
Package: vue-toast-mobile
Created by: ElemeFE
Last modified: Tue, 28 Jun 2022 20:34:33 GMT
Version: 2.0.0
License: MIT
Downloads: 462
Repository: https://github.com/ElemeFE/vue-toast-mobile

Install

npm install vue-toast-mobile
yarn add vue-toast-mobile

Overview

vue-toast-mobile is a mobile toast plugin for vue.js.

Installation

First, install vue-toast-mobile from npm:

 $ npm install vue-toast-mobile

Then use it:

 // ES6 mudule
import Toast from 'vue-toast-mobile';

// CommonJS
const Toast = require('vue-toast-mobile').default;

Usage

Basically you can pass a string to Toast:

 Toast('Upload Completed');

Or invoke Toast with an object as its configuration:

 Toast({
  message: 'Upload Completed',
  position: 'bottom',
  duration: 5000
});

API

Option Description Value Default
message content of the toast
position location of the toast relative to viewport 'top' 'bottom' 'middle' 'middle'
duration time before the toast vanishes, in millisecond 3000
className custom class name of the toast
iconClass class name of the optional icon font

License

MIT

RELATED POST

10 Must-Know Windows Shortcuts That Will Save You Time

10 Must-Know Windows Shortcuts That Will Save You Time

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Navigating AWS Networking: Essential Hacks for Smooth Operation

Navigating AWS Networking: Essential Hacks for Smooth Operation

Achieving Stunning Visuals with Unity's Global Illumination

Achieving Stunning Visuals with Unity's Global Illumination

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code