An open API service indexing awesome lists of open source software.

https://github.com/ahmedalyousif/stepper-progress-bar

An Angular component that shows a progress bar for a group of steps.
https://github.com/ahmedalyousif/stepper-progress-bar

angular

Last synced: about 1 month ago
JSON representation

An Angular component that shows a progress bar for a group of steps.

Awesome Lists containing this project

README

          

# StepperProgressBar

This library represent a progress bar component that has steps in it. I used this [tutorial](https://medium.com/@beyondborders/building-a-responsive-progress-bar-ea5a0ecabe91) to create this component to be reusable in Angular.

# Install

`npm install stepper-progress-bar`

in your `app.module.ts` file:
```typescript
//...
import { StepperProgressBarModule } from 'stepper-progress-bar'
//...
@NgModule({
//...
imports: [
//...
StepperProgressBarModule,
//...
],
/...
})
export class AppModule { }
```

# How to Use

Your component HTML:

```html

Back//a button to go to previous step
Next//a button to go to next step
```

Your component .TS:

```typescript
import { Step, StepperProgressBarController } from 'stepper-progress-bar';
//...
steps:Step[] = new Array();
progressStepper:StepperProgressBarController = new StepperProgressBarController();
//...
this.steps.push(new Step('Step 1'));
this.steps.push(new Step('Step 2'));
this.steps.push(new Step('Step 3'));
//...
next(){
this.progressStepper.nextStep();
}
back(){
this.progressStepper.previousStep();
}
```

You can now have a vertical stepper progress bar:

in the html:
```html

```

in .TS
```javascript
isVertical=true;
```