# vue-browser-notifications

> A simple and minimalistic setup for creating Vue 3 composables.

Latest version **1.1.1** (published 2022-08-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install vue-browser-notifications
pnpm add vue-browser-notifications
yarn add vue-browser-notifications
bun add vue-browser-notifications
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.1 |
| Published | 2022-08-15 |
| First published | 2022-08-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 5.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 29 |
| Author | Conner Bachmann |
| Maintainers | intevel |

## Links

- npm: https://www.npmjs.com/package/vue-browser-notifications
- Repository: https://github.com/Intevel/vue-browser-notifications
- Homepage: https://github.com/Intevel/vue-browser-notifications#readme
- Issues: https://github.com/Intevel/vue-browser-notifications/issues
- npm.io page: https://npm.io/package/vue-browser-notifications

## Dependencies (1)

- [defu](https://npm.io/package/defu.md) ^6.0.0

## Recent versions

- 1.1.1 (latest) — 2022-08-15

## README

# 📦 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

```ts
useNotifications(requestOnNotify: boolean, options?: NotificationOptions)
```

**`requestOnNotify`**
- Default: `true`
- Will request permissions everytime `sendNotification` is executed

**`options`**
- *Optional*
- Type: [NotificationOptions](https://github.com/Intevel/vue-browser-notifications/blob/master/src/types/index.d.ts#L1)
- Will override options on `sendNotifications`, can be used for global Notification settings like Icons.

## 💻 Example

```ts
<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

---
_Source: https://npm.io/package/vue-browser-notifications · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
