# ui-preloader

Latest version **1.0.0** (published 2019-09-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install ui-preloader
pnpm add ui-preloader
yarn add ui-preloader
bun add ui-preloader
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2019-09-06 |
| First published | 2019-09-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 42.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | NEULAND. Medienagentur |
| Maintainers | neulandmedienagentur |

## Links

- npm: https://www.npmjs.com/package/ui-preloader
- Repository: https://github.com/neulandagentur/webpack-starter
- Homepage: https://github.com/neulandagentur/webpack-starter#readme
- Issues: https://github.com/neulandagentur/webpack-starter/issues
- npm.io page: https://npm.io/package/ui-preloader

## Dependencies (1)

- [create-element-lib](https://npm.io/package/create-element-lib.md) ^0.2.0

## Recent versions

- 1.0.0 (latest) — 2019-09-06

## README

<p align="center"><img src="assets/logo.png" width="300" height="auto"></p>

---

Ui-Preloader is a simple vanilla js component for simple messages in the browser.

## Install / Import

### via npm

Install the package
``` sh
npm i ui-preloader --save
```

``` javascript
import { init as UiPreloaderInit } from 'ui-preloader';
```


### via script

Download the file **ui-preloader.js** in the `js/dist/` folder and place it into your html file.

```html
...
<body>

  ...
  <script src="ui-prelader.js"></script>
  <script>
    // use here
  </script>

</body>
```

## API
To create a preloader component you just need to call the init function.
The first argument is the root. It´s the container where the component gets inserted.
Root is by default the body element.

`init(root <HTML Element>)`

``` javascript
  const myPreloader = init(document.querySelector('.container'));
```

`close()`
Once you create an inheritance and the preloader is not needed anymore
you can just call the destroy method to remove it from the dom.

``` javascript
 myPreloader.close()
```

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