# step-progress-bar

> Simple step progress bar for angular 6+

Latest version **1.0.2** (published 2020-03-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install step-progress-bar
pnpm add step-progress-bar
yarn add step-progress-bar
bun add step-progress-bar
```

## 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.2 |
| Published | 2020-03-10 |
| First published | 2020-03-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 89.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | erivanbarbosa |

## Links

- npm: https://www.npmjs.com/package/step-progress-bar
- Repository: https://github.com/erivanbarbosa/lib-step-progress-bar
- Issues: https://github.com/erivanbarbosa/lib-step-progress-bar/issues
- npm.io page: https://npm.io/package/step-progress-bar

## Dependencies (1)

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

## Recent versions

- 1.0.2 (latest) — 2020-03-10
- 1.0.1 — 2020-03-10
- 1.0.0 — 2020-03-10
- 0.0.3 — 2020-03-09
- 0.0.2 — 2020-03-09
- 0.0.1 — 2020-03-09

## README

<div align="center">
  <h1>Step Progress Bar</h1>
  <br>
   A very simple step progress bar for angular
  <br>
  <br>
</div>


## Features

- Step success style
- Step fail style
- Steps reseting

## Dependencies
Angular 6 or higher


## Install

```bash
npm i step-progress-bar
```

## Setup

**Add to NgModule:** add StepProgressBarModule to desired NgModule,

```typescript
import { CommonModule } from '@angular/common';

import {StepProgressBarModule} from 'step-progress-bar'

@NgModule({
  imports: [
    CommonModule,
    StepProgressBarModule // StepProgressBarModule added
  ],
  bootstrap: [App],
  declarations: [App]
})
class MainModule {}
```

## Use

Add **redesprou-step-progress-bar** in desired hmtl page, providing the desired number of steps
```html
...
<div>
    <redesprou-step-progress-bar steps="5"></redesprou-step-progress-bar>
</div>
...

```

Create a ViewChild for  **StepProgressBarComponent** and call is methods as needed

```typescript
import { StepProgressBarComponent } from 'step-progress-bar/lib/step-progress-bar/step-progress-bar.component';

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
})
export class AppComponent {

  @ViewChild(StepProgressBarComponent, {static: false}) stepProgressBarComponent: StepProgressBarComponent;

  success() {
    this.stepProgressBarComponent.setSuccess();
  }

  fail() {
    this.stepProgressBarComponent.setFail();
  }

  reset() {
    this.stepProgressBarComponent.reset();
  }
}
```

## Options


| Option            | Description                              |
| ----------------- | ---------------------------------------- |
| step              | The number of steps in this progress bar |



## Functions
```
setSuccess():void
```
Advances one step, setting current step as "SUCESS"
Do nothing if last step is alredy set
##
```
setFail():void
```
Advances one step, setting current step as "FAIL"
Do nothing if last step is alredy set
##
```
reset():void
```
Resets to the first step, setting all steps as "PENDENT"
##

## License

MIT

---

> GitHub [@erivanbarbosa](https://github.com/erivanbarbosa) &nbsp;&middot;&nbsp;

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