Socket
Socket
Sign inDemoInstall

@brightlayer-ui/ng-progress-icons

Package Overview
Dependencies
9
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @brightlayer-ui/ng-progress-icons

Angular progress icons for Brightlayer UI applications


Version published
Weekly downloads
16
increased by14.29%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

Brightlayer UI Progress Icons

Progress icons

This is a library of icons with dynamic fill capabilities that can be used to show progress (similar to a traditional progress spinner or bar). These can be used to show health, battery life, etc.

Currently, we have icons available for:

  • battery
  • heart
  • pie
  • ups

Installation

To install the Brightlayer UI progress icons from NPM as a dependency for your project, you can run one of the following commands in your project root:

yarn add @brightlayer-ui/ng-progress-icons // for Angular components

Using the progress icons in your application

The progress icon components can be imported and used like you would use any other component. You can manually set the desired color for the icon, otherwise it will inherit the text color of its parent container;

// app.module.ts
import { NgProgressIconsModule } from '@brightlayer-ui/ng-progress-icons';

...
imports: [
    NgProgressIconsModule
],
<!-- app.component.html -->
<battery-progress percent="80" size="36" color="green" [charging]="true" [outlined]="true"></battery-progress>
<heart-progress percent="99" size="36" color="pink" [outlined]="true"></heart-progress>
<pie-progress percent="30" size="36" color="#0000ff" ring="4" [outlined]="true"></pie-progress>
<ups-progress percent="10" size="36" color="#0000ff" [outlined]="true"></ups-progress>

API

Shared Attributes

These props are available on all of the progress icons in this package.

@InputDescriptionTypeRequiredDefault
backgroundColorBackground color for the unfilled areastringno
colorThe color used for the icon fillstringno'currentColor'
labelColorLabel text colorstringno
labelPositionWhere to display the text labeltop, bottom, center, right, leftnocenter
labelSizeSize of the label in pxnumbernosize/4
outlinedWhether to use the outlined stylebooleannofalse
percentThe amount to fill the icon (0-100)numberno100
showPercentLabelOption to show percentage overlaybooleannofalse
sizeThe size of the icon (in px)numberno24

Any other props supplied will be provided to the root element (svg).

Battery Attributes

The battery supports all of the shared attributes above and the following additional attribute:

@InputDescriptionTypeRequiredDefault
chargingWhether to show the charging indicatorbooleannofalse

Pie Attributes

The pie supports all of the shared attributes above and the following additional attribute:

@InputDescriptionTypeRequiredDefault
ringThe thickness of the outer ring (1 = thin ring, 10 = full circle )numberno10

Building & Packaging

These progress icons are currently created manually by modifying the svg files from the design folder with various clip paths and fill algorithms. They are then packaged up for distribution via npm.

The Angular icons are built using the library packages built into the Angular CLI (read more).

To create a new component:

cd icons/progress/angular
ng generate component component-name --project=ng-progress-icons

And then to create the /dist version:

ng build ng-progress-icons
or
yarn build

Once you have built the library, you can publish to npm via:

cd dist/ng-progress-icons
npm version patch
npm publish

Keywords

FAQs

Last updated on 18 Jan 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc