vue-bootstrap-toast-notification
v0.0.1
Published
> Simple toast notifications for Vue3 & Bootstrap5 project
Downloads
20
Readme
Vue Bootstrap Toast Notification
Simple toast notifications for Vue3 & Bootstrap5 project
Installation
npm install vue-bootstrap-toast-notification
Usage with Composition API
<template>
<Toast :notification="notification"></Toast>
<button @click.prevent="notify">NOTIFY</button>
</template>
<script setup lang="ts">
import { ref } from 'vue'
import { Toast } from 'vue-bootstrap-toast-notification'
const notification = ref({})
function notify() {
notification.value = {
type: 'success',
message: 'Success!'
}
}
</script>
<style>
@import 'bootstrap/scss/bootstrap.scss';
</style>