Getting Started

The Vue.js component to display single flash message or multiple flash messages to user. It has styles presets, but can be easily customized by passing style object as argument.

Installation

Use your package manager to install the package

## Install via npm
npm i @smartweb/vue-flash-message

## Install via yarn
yarn add @smartweb/vue-flash-message

Setup and Configuration in Vue project

Register the component in your app entry point (main.js or as you called it)

import Vue from 'vue';
import FlashMessage from '@smartweb/vue-flash-message';
Vue.use(FlashMessage);

You can pass configuration object as second argument

Vue.use(FlashMessage, config);

Setup and Configuration in Nuxt project

Create vue-flash-message.js file in plugins directory and put the following code

import Vue from 'vue';
import VueFlashMessage from '@smartweb/vue-flash-message';
 
Vue.use(VueFlashMessage);

In your nuxt.config.js file register your plugin

Last updated

Was this helpful?