Scalar useToasts()
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>