# Getting Started

### Installation

Use your package manager to install the package

```bash
## 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)

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

&#x20;You can pass [configuration object](/vue-flash-message/configuration.md) as second argument

```javascript
Vue.use(FlashMessage, config);
```

### Setup and Configuration in Nuxt project

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

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

In your nuxt.config.js file register your plugin

```javascript
 {
     /*  Since Nuxt.js 2.4, mode has been introduced as option of plugins to specify plugin type, possible value are: client or server. ssr: false will be adapted to mode: 'client' and deprecated in next major release.
     More info: https://nuxtjs.org/guide/plugins#client-side-only */
     plugins: [{ src: '~/plugins/flash-message.js', mode: 'client' }]
 },
```

###


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://smwb-tech.gitbook.io/vue-flash-message/master.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
