@scalar/use-toasts
v0.7.7
Published
display toasts in Vue
Downloads
73,597
Readme
Scalar useToasts()
Installation
npm install @scalar/use-toasts
Usage
// App.vue
<script setup>
import { ScalarToasts } from '@scalar/use-toasts'
</script>
<template>
<ScalarToasts />
</template>
// ChildComponent.vue
<script setup>
import { useToasts } from '@scalar/use-toasts'
const { toast } = useToasts()
const sendMessage = () => {
toast('This is a message from the toaster!', 'success', { timeout: 2000 })
}
</script>