Skip to content

Intevel/vue-browser-notifications

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

17 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ’¬ 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 { useNotifications } from 'vue-browser-notifications'
const { requestPermission, sendNotification } = useNotifications(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

About

πŸ’¬ Easy to use Vue 3 composable for managing browser notifications

Resources

License

Stars

Watchers

Forks

Contributors