# one-notification

> A lightweight JavaScript package for Samsung One UI styled notification.

Latest version **1.0.0** (published 2022-10-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install one-notification
pnpm add one-notification
yarn add one-notification
bun add one-notification
```

## 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.0.0 |
| Published | 2022-10-08 |
| First published | 2022-10-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 24.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Rifki Ardiansyah |
| Maintainers | rifkiard |
| Keywords | frontend, notification, alert, oneUI, samsung, framework, ui, design, component, components |

## Links

- npm: https://www.npmjs.com/package/one-notification
- npm.io page: https://npm.io/package/one-notification

## Alternatives

- [@progress/kendo-ooxml](https://npm.io/package/@progress/kendo-ooxml.md) — 152.1K weekly downloads
- [@progress/kendo-react-ripple](https://npm.io/package/@progress/kendo-react-ripple.md) — 8.0K weekly downloads
- [@progress/kendo-react-orgchart](https://npm.io/package/@progress/kendo-react-orgchart.md) — 4.3K weekly downloads
- [@praxisui/dynamic-fields](https://npm.io/package/@praxisui/dynamic-fields.md) — 2.4K weekly downloads
- [@progress/kendo-vue-listbox](https://npm.io/package/@progress/kendo-vue-listbox.md) — 932 weekly downloads

## Recent versions

- 1.0.0 (latest) — 2022-10-08

## README

<h1 align="center">
  <a href="https://www.npmjs.com/package/one-notification" target="_blank">One Notification</a>

  <br />
  <br />

  <img src="https://raw.githubusercontent.com/rifkiard/one-notification/main/miscellaneous/example.gif">
</h1>

<div align="center">

### A lightweight JavaScript package for Samsung One UI styled notification.

![test](https://img.shields.io/github/workflow/status/rifkiard/one-notification/CI)
[![npm package](https://img.shields.io/npm/v/one-notification?color=blue)](https://img.shields.io/npm/v/one-notification?color=blue)
[![npm downloads](https://img.shields.io/npm/dm/one-notification)](https://img.shields.io/npm/dm/one-notification)
[![npm bundle size](https://img.shields.io/bundlephobia/min/one-notification)](https://img.shields.io/bundlephobia/min/one-notification)
[![supported node version](https://img.shields.io/node/v/one-notification)](https://img.shields.io/node/v/one-notification)
[![contributors](https://img.shields.io/github/contributors/rifkiard/one-notification)](https://img.shields.io/github/contributors/rifkiard/one-notification)
[![last commit](https://img.shields.io/github/last-commit/rifkiard/one-notification)](https://img.shields.io/github/last-commit/rifkiard/one-notification)
[![license](https://img.shields.io/npm/l/one-notification)](https://img.shields.io/npm/l/one-notification)
</div>

# Installation

```shell
npm install one-notification
```

Or in browser you can use One Notification with UNPKG:

```html
<link rel="stylesheet" href="https://unpkg.com/one-notification/dist/one-notification.min.css">
<script src="https://unpkg.com/one-notification"></script>
```

# Usage

```JavaScript
import oneNotification from "one-notification";
import "one-notification/dist/one-notification.min.css";

oneNotification({
  /* configuration */
});
```

# Configuration

There are some configuration properties that you can pass into the function parameter:

|key|type|required|default|description|
|-|-|-|-|-|
|text|`string`|required||Text that displayed on notification|
|icon|`string`|required||Icon that displayed on notification (You can use text, or HTML tag)|
|onClick|`function`|||A function that fired when notification is clicked|
|iconSize|`number`||21|Icon size in pixels|
|iconColor|`string`||#FFFFFF|Icon color|
|iconBackgroundSize|`number`||42|Icon background size in pixels|
|iconBackgroundColor|`string`||#1B9CFC|Icon background color|
|duration|`string`||4s|Duration of notification|
|color|`string`||#FFFFFF|Text color|
|backgroundColor|`string`||#1E272E|Notification color|
|fontSize|`number`||14|Font size in pixels|
|fontWeight|`number`||500|Font weight|
|fontFamily|`string`||sans-serif|Font family (use it when you are already imported font file in somewhere else)|
|iconScale|`number`||0.70|Scale down icon when notification is active|
|borderRadius|`number`||1000|Notification border radius|
|zIndex|`number`||1400|Notification z-index|

# LICENSE
[One Notification](https://www.npmjs.com/package/one-notification) is released under the [MIT](https://github.com/rifkiard/one-notification/blob/main/LICENSE) license.

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