# ldnotify

> simple notification widget

Latest version **0.0.7** (published 2026-09-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install ldnotify
pnpm add ldnotify
yarn add ldnotify
bun add ldnotify
```

## Health

**Score 50/100 (C)** — status: active.

Positive: no vulnerabilities; recently updated.

Warnings: low downloads; no types; no esm support; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.0.7 |
| Published | 2026-09-03 |
| First published | 2020-12-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=10.14.1 |
| Dependencies | 0 |
| Unpacked size | 19.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | zbryikt |
| Maintainers | tkirby |

## Links

- npm: https://www.npmjs.com/package/ldnotify
- Repository: https://github.com/loadingio/ldnotify
- Issues: https://github.com/loadingio/ldnotify/issues
- npm.io page: https://npm.io/package/ldnotify

## Recent versions

- 0.0.7 (latest) — 2026-09-03
- 0.0.6 — 2022-06-20
- 0.0.5 — 2022-01-19
- 0.0.4 — 2021-11-11
- 0.0.3 — 2021-11-11
- 0.0.2 — 2021-11-11
- 0.0.1 — 2020-12-15

## README

# ldnotify

simple notification widget.


## Installation

    npm install --save ldnotify


## Usage

include `ldnotify.js` and `ldnotify.css`, then send a notification with:

    ldnotify.send('success', 'message of your notification');

`send` takes an optional third argument to override options for that single
message:

    ldnotify.send('danger', 'upload failed', {delay: 6000, dismissible: false});

Available per-message options:

 - delay: how long this message is shown, in ms. defaults to the instance `delay`.
 - dismissible: whether this message can be closed by clicking on it.
   defaults to the instance `dismissible`.

`send` returns the created message node.

By default there are following type of messages:

 - success
 - info
 - warning
 - danger
 - light
 - dark


## Customization

create a `ldnotify` object to customize it:

    ldn = new ldnotify({ ... options ... });


Following are the available options:

 - className: default CSS class for message box.
   - Should be array or space-separated string.
   - Default `ldnotify-item`.
 - classIn: CSS class for transition-in animation.
   - Should be array or space-separated string.
   - Default `ldnotify-in`.
 - classOut: CSS class for transition-out animation.
   - Should be array or space-separated string.
   - Default `ldnotify-out`.
 - delay: how long a message is shown. default `3000` ( in ms ).
 - dismissible: if true, a message can be closed by clicking on it. default `true`.
 - classDismissible: CSS class applied to dismissible messages.
   - Should be array or space-separated string.
   - Default `ldnotify-dismissible`.
 - class-by-type(type): type class generator function. should return a css class name corresponding to the input type.
   - default `function(type) { return "ldnotify-" + type; }`.
   - there is no limitation about the type you want to use, but you have to add the corresponding classes yourself. 
 - root: container of messages. auto created if omitted.


# credit

sample icons are provided by [feathericons.com](https://feathericons.com/).

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