npm.io
0.10.4 • Published 5d ago

@scalar/use-toasts

Licence
MIT
Version
0.10.4
Deps
2
Size
20 kB
Vulns
0
Weekly
0
Stars
15.5K

Scalar useToasts()

Version Downloads License Discord


Scalar is an open-source API platform for teams who want beautiful developer interfaces without vendor lock-in.

  • API References — Interactive API documentation from OpenAPI and AsyncAPI specs.
  • Developer Docs — Write in Markdown/MDX, generate API references, sync with two-way Git.
  • SDK Generator — Type-safe SDKs and CLIs in TypeScript, Python, Go, PHP, Java, and Ruby.
  • API Client — Open-source, offline-first Postman alternative built on OpenAPI.

20M+ monthly npm installs · 15,500+ GitHub stars · MIT licensed · scalar.com


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>

Keywords