New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

circle-progress-ts

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

circle-progress-ts

[Demo](https://marinewater.github.io/circle-progress/demo.html)

latest
Source
npmnpm
Version
2.0.2
Version published
Maintainers
1
Created
Source

circle-progress

Demo

Table of contents

  • Installation
  • Usage
    • JS and CSS
    • SCSS
    • Typescript
  • Styling
    • CSS
      • Background
      • Circle color
      • Circle progress color
      • Circle width
    • SCSS
      • Background
      • Circle color
      • Circle progress color
      • Circle width

Installation

npm install --save circle-progress-ts 

Usage:

  • JS and CSS
  • Scss
  • Typescript

JS and CSS

Include stylesheet, e.g.

<link rel="stylesheet" type="text/css" href="node_modules/circle-progress-ts/dist/progress.css">

Include javascript, e.g.

<script src="node_modules/circle-progress-ts/dist/progress.min.js"></script>

Add div to html

<div class="circle"></div>

Add styling to your own css

.circle {
    width: 150px;
    height: 150px;
}

Initialize progress circle in JS

var circle = document.querySelector( '.circle' );
var p = new progress.Progress( circle );

Change progress

// change current progress to 20%
p.progress( 20 );

or animate progress change over time

// changes from current progress to 60% over 500ms
p.progress_animate( 60, 500 );

Scss

just import the scss file

@import "./node_modules/circle-progress-ts/sass/progress";

Typescript

// import circle progress lib
import { Progress } from 'circle-progress-ts';

// initialize
const circle = document.querySelector( '.circle' );
const p = new Progress( circle );

// change progress
p.progress( 20 );
p.progress_animate( 60, 500 );

Styling

  • CSS
  • SCSS

CSS

Example, Demo

  • Background
  • Circle color
  • Circle progress color
  • Circle width

Background

Usually the same as parent background

.circle .inner {
    background: #373737;
}

Circle color

color of the circle of the remaining progress

.circle .color {
    color: #fff;
}

Circle progress color

color of the circle of the completed progress

.circle .color {
    background-color: #f00;
}

Circle width

.circle .inner {
    width: 93%;
    height: 93%;
}

SCSS

Example, Demo

  • Background
  • Circle color
  • Circle progress color
  • Circle width

Background

Usually the same as parent background

$bg-color: #1c1d61;

Circle color

color of the circle of the remaining progress

$circle-color: #6c6c6c;

Circle progress color

color of the circle of the completed progress

$circle-progress-color: #ff9205;

Circle width

$circle-width: 7%;

FAQs

Package last updated on 05 Jun 2019

Did you know?

Socket

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