DEV Community

Cover image for A complete angular progress bar โœจ
Nicola Taddei
Nicola Taddei

Posted on

A complete angular progress bar โœจ

Hi guys,

I think I created a great customizable progress-bar for angular2+.

Screenshot

๐Ÿงจ Features ๐Ÿงจ

Classic features ๐ŸŽ :

โ€ข Possibility to choose a bar, a spinner or both of them
โ€ข Custom color
โ€ข Custom height and diameter
โ€ข Indeterminate bar like Material
โ€ข Spinner speed

Other features ๐ŸŽ†:

โ€ข Possibility to show an overlay
โ€ข Custom overlay value
โ€ข Http interceptor and urls filtering
โ€ข It supports multiple requests. If during the bar progress another request is fired, bar will not reset and keep going until all requests are completed.

Killer feature ๐ŸŽ‡:

It can be instantiated multiple times. Only the deepest one will be displayed

Check it out ๐Ÿ‘‰๐Ÿป

GitHub logo kKen94 / ngx-progress

The most powerful and customizable progress bar for Angular โœจ

@kken94/ngx-progress

Build Status npm version CodeClimate Codacy code style: prettier semantic-release license Donate

NgxProgress is customizable Angular library for showing a progress bar during http request and/or routing change (or all you want) and prevent user interaction.

Changelog

Please read the changelog

Installation

If you use npm

npm install @kken94/ngx-progress --save
Enter fullscreen mode Exit fullscreen mode

If you use yarn

yarn add @kken94/ngx-progress
Enter fullscreen mode Exit fullscreen mode

Usage

Choose the most suitable module for you.

There are two modules:

  • NgxProgressModule (manage progress bar by yourself)
  • NgxProgressHttpModule (import progress bar and intercept http requests)

Warning: to use http module import that in your app.module.ts, then import NgxProgressModule where you want to use progress bar.


import { NgxProgressHttpModule } from '@kken94/ngx-progress';

@NgModule({
  declarations: [AppComponent],
  imports: [
    ...
    NgxProgressHttpModule,
    ...
  ],
  bootstrap: [AppComponent],
})
export class AppModule {}

and place it into the element you want to cover.

Note: If you want to use overlay be sure that the parent element has position:relative Overlay works with position:absolute, top:0, left:0

<div style="position:
โ€ฆ

Would you like to help me test it and find bugs? ๐Ÿ˜

Top comments (0)