vue-browser-notifications
TypeScript icon, indicating that this package has built-in type declarations

1.1.1 • Public • Published

📦 vue-browser-notifications

Easy to use Vue 3 composable for managing browser notifications

  • 🧩 TypeScript Support
  • 🌐 Vue 3 Support
  • Send & Close Browser Notifications

📋 Installation

yarn add vue-browser-notifications

npm install vue-browser-notifications

🔗 Options

useNotifications(requestOnNotify: boolean, options?: NotificationOptions)

requestOnNotify

  • Default: true
  • Will request permissions everytime sendNotification is executed

options

  • Optional
  • Type: NotificationOptions
  • Will override options on sendNotifications, can be used for global Notification settings like Icons.

💻 Example

<script setup lang="ts">
import { useTestComposable } from '../src/index'
const { requestPermission, sendNotification } = useTestComposable(true, { icon: 'https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png'})

sendNotification('Hello World', { body: 'Hallo Welt' })
</script>

💚 License

MIT License - Conner Luka Bachmann

Readme

Keywords

none

Package Sidebar

Install

npm i vue-browser-notifications

Weekly Downloads

2

Version

1.1.1

License

MIT

Unpacked Size

5.53 kB

Total Files

6

Last publish

Collaborators

  • intevel