# @corentinmag/ngx-splash

> spash screen for angular 12

Latest version **1.0.0** (published 2022-02-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install @corentinmag/ngx-splash
pnpm add @corentinmag/ngx-splash
yarn add @corentinmag/ngx-splash
bun add @corentinmag/ngx-splash
```

## Health

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

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2022-02-21 |
| First published | 2022-02-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 59 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Corentin MAGYAR |
| Maintainers | corentinmag |
| Keywords | angular, angular2, splash screen, splash |

## Links

- npm: https://www.npmjs.com/package/@corentinmag/ngx-splash
- Repository: https://github.com/CorentinMAG/packages
- Homepage: https://github.com/CorentinMAG/packages#readme
- Issues: https://github.com/CorentinMAG/packages/issues
- npm.io page: https://npm.io/package/@corentinmag/ngx-splash

## Dependencies (1)

- [tslib](https://npm.io/package/tslib.md) ^2.3.0

## Recent versions

- 1.0.0 (latest) — 2022-02-21

## README

To use this library:

```bash
$ npm install @corentinmag/ngx-splash lottie-web ngx-lottie
```

> check demo [here](https://packages-xi.vercel.app )

```typescript
// app.module.ts

import { NgxSplashModule } from '@corentinmag/ngx-float-button';
import { BrowserModule } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
...

@NgModule({
    ...,
    imports: [
        BrowserModule,
        BrowserAnimationsModule,
        NgxSplashModule
    ]
})
```


```html
<!-- app.component.html -->
<ngx-splash 
    title="My Awesome App" 
    message="Loading application..."
    [stages]="stages"
    animation="assets/lottie-animation.json"
    icon="assets/logo.jpg"
    loader="assets/loader.svg"
    (finalize)="onFinalize($event)"
>
</ngx-splash>
```

**List of Inputs**

| @Inputs              | type                                 | default  | description  |
|----------------------|--------------------------------------|----------|--------------|
| **title**            | `string`                             | `My App` |  title       |
| **message**          | `string`                             | `Loading...`   | custom message to help user  |
| **loader**          | `string`                             | null   | path to the loader (svg)  |
| **icon**            | `string`                       | null| path to the main icon (enterprise logo, ...)  |
| **animation**         | `string`          | null     | either a lottie json file or a lottie url  |
| **stages**         | `Stage[]`  | null  | An array  of object containing the following keys `messageBefore`, `messageAfter`, `observable`  |
| **keyframe**     | `Keyframe[]`                             | null      | animation that is played while the slash screen is active   |
| **keyframeOptions**         | `object`                             | `15`     | option for the keyframe object   |


## Stage

```typescript
stages = [
        {
          messageBefore: 'Initializing profile...',
          messageAfter: 'Profile initialized!',
          observable: timer(2000)
        },
        {
          messageBefore: 'Getting data...',
          messageAfter: 'Got data!',
          observable: timer(5000)
        },
      ]
```

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