# story-onboarding

> Onboarding for angular7

Latest version **1.0.6** (published 2020-04-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install story-onboarding
pnpm add story-onboarding
yarn add story-onboarding
bun add story-onboarding
```

## 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.6 |
| Published | 2020-04-24 |
| First published | 2020-04-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 124.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | stories2 |
| Maintainers | stories282 |
| Keywords | angular7, typescript, onboarding |

## Links

- npm: https://www.npmjs.com/package/story-onboarding
- Repository: https://github.com/stories2/Angular-Onboarding
- Issues: https://github.com/stories2/Angular-Onboarding/issues
- npm.io page: https://npm.io/package/story-onboarding

## Dependencies (1)

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

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 1.0.6 (latest) — 2020-04-24
- 1.0.5 — 2020-04-24
- 1.0.4 — 2020-04-24
- 1.0.3 — 2020-04-24
- 1.0.2 — 2020-04-24
- 1.0.1 — 2020-04-24
- 1.0.0 — 2020-04-24

## README

# Onboarding for angular7

![demo](demo/demo.gif)

Show onboarding for angular 7.

## How to use

```
<Ng7-Onboarding [story]="storyBoard" [gap]='20' (done)="endOfTutorial($event)"></Ng7-Onboarding>
```

`story`
- Set onboarding flow array.

`gap`
- Set gap between highlighted DOM and onboarding popup.

`done` 
- Trigger when onboarding is ended.

### Optional

`btnNextText`
- Set next button text.

`btnPrevText`
- Set previous button text.

`btnDoneText`
- Set done button text.

### Story board data

```
storyBoard = [
    {
      id: 'h1Wellcome',
      text: 'This is wellcome',
      direction: 'bottom'
    },
    {
      id: 'angularIcon',
      text: 'This is icon',
      direction: 'right'
    },
    {
      id: 'angularIcon',
      text: 'This is icon',
      direction: 'left'
    },
    ...
    {
      id: 'cli',
      text: 'This is cli',
      direction: 'bottom'
    },
    {
      id: 'blog',
      text: 'This is blog',
      direction: 'bottom'
    }
  ] as StoryOnboardingModel[];
```

`id`
- Will highlight DOM's ID

```
<h1 id="h1Wellcome"> <!-- h1Wellcome is id -->
    Welcome to {{ title }}!
</h1>
```

`text`
- Onboarding message.

`direction`
- Onboarding view's direction. `left`, `top`, `right`, `bottom` avaliable.

-------------------------

`app.module.ts`

```
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';

import { AppComponent } from './app.component';

import { OnboardingModule } from 'story-onboarding';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    OnboardingModule // <-- onboarding module
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

```

OR

`app.module.ts`

```
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';

import { AppComponent } from './app.component';

import { MatButtonModule, MatCardModule } from '@angular/material';

import { OnboardingComponent } from 'story-onboarding';

@NgModule({
  declarations: [
    AppComponent,
    OnboardingComponent // <-- onboarding component
  ],
  imports: [
    BrowserModule,

    MatButtonModule, // <-- needed
    MatCardModule // <-- needed
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }
```


## Build Library

```
ng build Onboarding
```

## Publish Library

```
cd dist/onboarding
npm publish
```

### Reference

How to create angular library [link](https://medium.com/@esanjiv/complete-beginner-guide-to-publish-an-angular-library-to-npm-d42343801660)

CSS Spotlight [link](http://jsfiddle.net/XYXHR/)

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