Skip to content

Vitoast is a simple and customizable toast package for Vue.js,

License

Notifications You must be signed in to change notification settings

itsalimanuel/vitoast

Repository files navigation

Vitoast - Vue Toast Package

vitoast

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.

Installation

You can install vitoast using npm or yarn.

# npm
npm install vitoast

# yarn
yarn add vitoast

Usage

Importing in your Vue component

import Vue from 'vue';
import toast from 'vitoast';

Vue.use(toast);

Displaying a Toast

this.$toast.show({
  title: 'Success',
  position: "top-right",
  message: 'Operation completed successfully!',
  type: 'success',
  duration: 3000, // Duration in milliseconds
});

OR

toast({
  title: 'Success',
  position: "top-right",
  message: 'Operation completed successfully!',
  type: 'success',
  duration: 3000, // Duration in milliseconds
});

Options

  • 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'

Authors

  • Ali Khalouf

About

Vitoast is a simple and customizable toast package for Vue.js,

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published