Basic Usage

Example of basic usage

Put the component into your template

<template>
    <FlashMessage/>
</template>

You can pass a string as position property to set up default position of messages block. Valid values: 'right bottom', 'right top', 'left bottom', 'left top'.

<FlashMessage :position="right bottom"/>

Now you can access flash message by using global EventBus alias (that is "flashMessage" by default) of your Vue instance

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

Last updated