> For the complete documentation index, see [llms.txt](https://smwb-tech.gitbook.io/vue-flash-message/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://smwb-tech.gitbook.io/vue-flash-message/public-methods.md).

# Public Methods

You can manipulate flash message with several methods

#### Display Methods

Every display message method will return the id of the message instance.  You can pass the [data object](/vue-flash-message/data-object.md) to configure a message instance as first argument and [callbacks object](/vue-flash-message/callbacks-object.md) as second argument.

```javascript
// Basic usage
this.flashMessage.show({
    status: 'error',
    title: 'Error Message Title',
    message: 'Oh, you broke my heart! Shame on you!'
});
```

You also can use shorthands without status property

```javascript
this.flashMessage.error({
	title: 'Error Message Title',
	message: 'Oh, you broke my heart! Shame on you!'
});
this.flashMessage.warning({
	title: 'Warning Message Title',
	message: "Don't stop me nooooow....!"
});
this.flashMessage.info({
	title: 'Info Message Title',
	message: 'Just want you to know, that Vue is so cool'
});
this.flashMessage.success({
	title: 'Success Message Title',
	message: 'Hoorah, it is my fist npm package and it works!'
});
```

#### Delete Method

You can delete message programmatically using deleteMessage method

```javascript
let id = this.flashMessage.info({
	title: 'Hey, man. Time for beer!',
	message: 'It is Friday. Time to have a little party.'
});
this.flashMessage.deleteMessage(id);
```

#### Switch strategy method

You can update default strategy using setStrategy method.

```javascript
/* Will return {Boolean} as result */
this.flashMessage.setStrategy('multiple'); // strategy changed to multiple
```
