npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

progress-button

v1.2.3

Published

A simple angular progress button.

Readme

Angular Progress Button

Build Status npm version demo online npm downloads Code Climate maintainability Code Coverage Dependencies GitHub issues Conventional Commits npm bundle size

This represents a button element where the button itself serves as a progress indicator. You can choose from 16 types of animations. 3D animation styles are used for showing the progress indication on one side of the button while rotating the button in perspective.

Table of contents

Features

  • [x] Choose from 16 different types of progress animations
  • [x] Choose the direction of the progress animation
  • [x] Manage success and error statuses
  • [x] Setup all style variables

Getting started

Step 1: Install progress-button:

npm i progress-button

Step 2: Import ProgressButtonModule:

import {ProgressButtonModule} from 'progress-button';

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

Usage sample

<ydd-progress-button 
    (action)="run($event)" 
    [progress]="progressData" 
    [design]="designData">
    Submit
</ydd-progress-button>

let progressData = {
    animation: 'shrink',
    direction: 'vertical',
}
  
let designData = {
    background: '#222222',
    color: '#FFFFFF',
    successBackground: '#00e175',
    errorBackground: '#ff0c00',
    successIconColor: '#ffffff',
    errorIconColor: '#ffffff',
    progressBackground: '#000000',
    progressInnerBackground: 'rgba(255, 255, 255,0.5)',
    radius:50
}

run = (instance)=>{
    let progress = 0;
    // initialize the progress
    instance.progressInit();
    // This is an example of interval useful to set the progress value
    const interval = setInterval(() => {
      progress += 5;
      // set the progress value
      instance.progressValue = progress;
      if (progress === 100) {
        // stop the progress with success status
        const sub = instance.progressStop('success').subscribe({
          complete() {
            sub.unsubscribe();
          }
        });
        clearInterval(interval);
      }
    }, 200);
  }

Global Configuration

You can easily define progress options and design during the import phase using the method forRoot. This is useful if you need to setup a common behaviour and/or a common style for your buttons.

import {ProgressButtonModule} from 'progress-button';  
  
@NgModule({  
  declarations: [AppComponent],  
  imports: [
	  ProgressButtonModule.forRoot({  
		  design: {...}, // ProgressButtonDesign interface  
		  progress: {...} // ProgressButtonData interface 
	  })
  ],  
  bootstrap: [AppComponent]  
})  
export class AppModule {}

API

Inputs

| Input | Type | Default | Required | Description | | ------------- | ------------- | ------------- | ------------- | ------------- | | name | string, null | null | no | A name for the button. | | value | string, null | null | no | An initial value for the button. | | type | button, reset, submit | button | no | The type of button. | | autofocus | true, null | null | no | Specifies that a button should automatically get focus when the page loads. | | disabled | true, null | null | no | Specifies that a button should be disabled. | | [form] | ProgressButtonForm | | no | Form parameters for the button. | | [progress] | ProgressButtonData | | no | Specifies progress parameters. | | [design] | ProgressButtonDesign | | no | Specifies button and progress design |

ProgressButtonForm

| Property | Type | Default | Required | Description | | ------------- | ------------- | ------------- | ------------- | ------------- | | id | string, null | null | no | Specifies one or more forms the button belongs to. | | action | string, null | null | no | Specifies where to send the form-data when a form is submitted. Only for type="submit". | | noValidate | boolean, null | button | no | Specifies that the form-data should not be validated on submission. Only for type="submit". | | enctype | application/x-www-form-urlencoded, multipart/form-data, text/plain, null | null | no | Specifies how form-data should be encoded before sending it to a server. Only for type="submit". | | method | get,post, null | null | no | Specifies how to send the form-data (which HTTP method to use). Only for type="submit". | | target | _blank, _self, _parent, _top, null | null | no | Specifies where to display the response after submitting the form. Only for type="submit". |

ProgressButtonData

| Property | Type | Default | Required | Description | | ------------- | ------------- | ------------- | ------------- | ------------- | | animation | fill, shrink, rotate-angle-bottom, rotate-angle-top, rotate-angle-left, rotate-angle-right, rotate-side-down, rotate-side-up, rotate-side-left, rotate-side-right, rotate-back, flip-open, slide-down, move-up, top-line, lateral-lines | fill | no | Defines the progress animation style. | | direction | horizontal, vertical | horizontal | no | Defines the progress animation direction. | | statusTime | number | 1500 | no | Time in ms that the status (success or error) will be displayed. |

ProgressButtonDesign

| Property | Type | Default | Required | Description | | ------------- | ------------- | ------------- | ------------- | ------------- | | background | string (css color) | #222222 | no | The background of the button. | | color | string (css color)| #FFFFFF | no | The text color of the button. | | successBackground | string (css color) | #00E175 | no | The background of the button when status is success. | | errorBackground | string (css color)| #FF0C00 | no | The background of the button when status is error. | | successIconColor | string (css color) | #FFFFFF | no | The color of the icon when status is success. | | errorIconColor | string (css color) | #FFFFFF | no | The color of the icon when status is error. | | progressBackground | string (css color) | #000000 | no | The background of the progress element. | | progressInnerBackground | string (css color) | rgba(255, 255, 255,0.5) | no | The background of the progress inner element. | | linesSize | number | 10 | no | The size in px of the progress lines. This value is used in the animation styles top-line and lateral-lines. | | radius | number | 0 | no | Sets rounded shape to button with given radius size. This value is used in all the animation styles except rotate-* animations. |

Outputs

| Output | Params | Description | | ------------- | ------------- | ------------- | | (action) | ProgressButtonComponent | Fires on a mouse click on the element. |

Methods ProgressButtonComponent

| Method | Params | Description | | ------------- | ------------- | ------------- | | progressInit | | Initialize the progress component. You can use it inside the action Output | | progressStop | success or error | Stop the progress component. You can use it inside the action Output. |

Properties ProgressButtonComponent

| Name | Description | | ------------- | ------------- | | progressValue | Useful to change the value of the progress. You can use it inside the action Output |

Support

If this project help you reduce time to develop, you can give me a cup of coffee :)

Donate

Author

Credits

This angular component is liberally inspired to Progress Button Styles of Mary Lou.

License

This project is licensed under the terms of the MIT license.