An open API service indexing awesome lists of open source software.

https://github.com/bitfumes/bridge-svelte-notification

Customisable and easy notifications system for svelte users
https://github.com/bitfumes/bridge-svelte-notification

Last synced: 4 months ago
JSON representation

Customisable and easy notifications system for svelte users

Awesome Lists containing this project

README

          

# Bridge Notifications

![Bridge Notification](https://user-images.githubusercontent.com/41295276/79585406-60ed7280-80ed-11ea-8b6c-864dbd14dad9.png)

## Demonstration

[https://bridge-notification.netlify.app](https://bridge-notification.netlify.app)

## Getting started

```bash
npm install --save bridge-svelte-notification
```

## Basic usage

```javascript
// App.svelte

import BridgeNotify from "bridge-svelte-notification";
<main>
<BridgeNotify />
...
</main>

```

```javascript
// ChildrenComponent.svelte

import { notify } from "bridge-svelte-notification";

function show(position) {
notify({
message: "Bridge Notification is Awesome 😍",
type: 'success',
duration: 3000,
position: 'center',
animate: {
y: 100,
x: 0,
duration: 500
}
});
}

Show Notification
```

## Providing custom style component

```javascript
// ChildrenComponent.svelte

import { notify } from "bridge-svelte-notification";

function show(position) {
notify({
message: "Bridge Notification is Awesome 😍",
type: 'success',
duration: 3000,
position: 'center',
animate: {
y: 100,
x: 0,
duration: 500
},
style:'backgound-color:blue;color:black'
});
}

Show Notification
```