@scalar/use-toasts

v0.4.0

Scalar useToasts()

Version Downloads License Discord

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>
npm i @scalar/[email protected]

Metadata

  • MIT
  • >=18
  • Scalar
  • released 9/12/2023

Downloads