Skip to content

๐Ÿ’ฌ Easy to use Vue 3 composable for managing browser notifications

License

Notifications You must be signed in to change notification settings

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