@scalar/use-toasts
TypeScript icon, indicating that this package has built-in type declarations

0.6.7 • Public • Published

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>

Package Sidebar

Install

npm i @scalar/use-toasts

Weekly Downloads

11,963

Version

0.6.7

License

MIT

Unpacked Size

45.9 kB

Total Files

13

Last publish

Collaborators

  • amritkahlon
  • scalar_geoff
  • mason-little
  • hwkr
  • tommastro
  • cameronrohani
  • hanspagel
  • marclave