Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-circular-progressbar

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-circular-progressbar

A circular progress indicator component

  • 2.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
301K
decreased by-1.17%
Maintainers
1
Weekly downloads
 
Created

What is react-circular-progressbar?

The react-circular-progressbar package is a React component library for creating customizable circular progress bars. It allows developers to easily display progress in a circular format with various customization options such as colors, text, and styles.

What are react-circular-progressbar's main functionalities?

Basic Circular Progress Bar

This feature allows you to create a basic circular progress bar. The `value` prop specifies the progress percentage.

import React from 'react';
import { CircularProgressbar } from 'react-circular-progressbar';
import 'react-circular-progressbar/dist/styles.css';

const MyComponent = () => (
  <div style={{ width: 200, height: 200 }}>
    <CircularProgressbar value={66} />
  </div>
);

export default MyComponent;

Customizable Styles

This feature allows you to customize the styles of the circular progress bar, including text color, path color, and trail color.

import React from 'react';
import { CircularProgressbar, buildStyles } from 'react-circular-progressbar';
import 'react-circular-progressbar/dist/styles.css';

const MyComponent = () => (
  <div style={{ width: 200, height: 200 }}>
    <CircularProgressbar 
      value={66} 
      styles={buildStyles({
        textColor: 'red',
        pathColor: 'turquoise',
        trailColor: 'gold'
      })}
    />
  </div>
);

export default MyComponent;

Adding Text Inside the Progress Bar

This feature allows you to add text inside the circular progress bar. The `text` prop can be used to display any text, such as the progress percentage.

import React from 'react';
import { CircularProgressbar, buildStyles } from 'react-circular-progressbar';
import 'react-circular-progressbar/dist/styles.css';

const MyComponent = () => (
  <div style={{ width: 200, height: 200 }}>
    <CircularProgressbar 
      value={66} 
      text={`${66}%`} 
      styles={buildStyles({
        textColor: 'black',
        pathColor: 'blue',
        trailColor: 'gray'
      })}
    />
  </div>
);

export default MyComponent;

Animation

This feature allows you to add animation to the circular progress bar. The `pathTransitionDuration` prop controls the duration of the animation.

import React from 'react';
import { CircularProgressbar, buildStyles } from 'react-circular-progressbar';
import 'react-circular-progressbar/dist/styles.css';

const MyComponent = () => (
  <div style={{ width: 200, height: 200 }}>
    <CircularProgressbar 
      value={66} 
      styles={buildStyles({
        pathTransitionDuration: 0.5
      })}
    />
  </div>
);

export default MyComponent;

Other packages similar to react-circular-progressbar

Keywords

FAQs

Package last updated on 27 Jun 2022

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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc