Vitoast is a simple and customizable toast package for Vue.js, designed to provide user-friendly notifications. It supports various options such as title, message, type (success, warning, info, error), and duration.
You can install vitoast using npm or yarn.
# npm
npm install vitoast
# yarn
yarn add vitoast
import Vue from 'vue';
import toast from 'vitoast';
Vue.use(toast);
this.$toast.show({
title: 'Success',
position: "top-right",
message: 'Operation completed successfully!',
type: 'success',
duration: 3000, // Duration in milliseconds
});
toast({
title: 'Success',
position: "top-right",
message: 'Operation completed successfully!',
type: 'success',
duration: 3000, // Duration in milliseconds
});
- title: (String) The title of the toast.
- message: (String) The main message of the toast.
- type: (String) The type of the toast. Possible values are 'success', 'warning', 'info', and 'error'.
- duration: (Number) The duration for which the toast will be displayed in milliseconds.
- position: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'
- Ali Khalouf