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

react-sweet-progress

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-sweet-progress

React Sweet Progress ================= [![npm version](https://badge.fury.io/js/react-sweet-progress.svg)](https://badge.fury.io/js/react-sweet-progress)

  • 1.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
15K
decreased by-8.69%
Maintainers
1
Weekly downloads
 
Created
Source

React Sweet Progress

npm version

A way to quickly add a react progress bar to your app 🌈

Imgur

Basic Usage

  1. Install via npm

    npm i -S react-sweet-progress
    
  2. Import Progress and progress bar styles

    import { Progress } from 'react-sweet-progress';
    import "react-sweet-progress/lib/style.css";
    
  3. Enjoy

    <Progress percent={88} status="success" />
    

Imgur

<Progress type="circle" percent={100} status="success" />

Imgur

Customize

Basic steps to customize React progress bar.

Percent 🏹

Percent cant set the completion percentage of progress bar.

<Progress />

Imgur


<Progress
  percent={69}
/>

Imgur

Status ⭐

You can use 3 status types: active, error, success. By default status equal to success when percent is 100.

<Progress
  percent={88}
  status="success"
/>

Imgur


<Progress
  percent={43}
  status="error"
/>

Imgur

Exotic theme 🔥

With theme param you can customize icons and styles of the progress bar.

<Progress
  theme={{
    success: {
      symbol: '🏄‍',
      color: 'rgb(223, 105, 180)'
    },
    active: {
      symbol: '😀',
      color: '#fbc630'
    },
    default: {
      symbol: '😱',
      color: '#fbc630'
    }
  }}
/>

Imgur Imgur Imgur

If you don't pass custom status then it will use the default color theme.

<Progress
  theme={{
    success: {
      symbol: '🏄‍',
      color: 'rgb(223, 105, 180)'
    }
  }}
/>

Imgur Imgur Imgur

Also you can use the status param.

<Progress
  percent={100}
  status="error"
  theme={{
    error: {
      symbol: '🤔',
      color: '#fbc630'
    }
  }}
/>

Imgur

Circle width 😲

Width param can set the size of circle progress bar, also it's set font and icon sizes automatically.

<Progress
  type="circle"
  width={70}
  percent={70}
/>
<Progress
  type="circle"
  percent={30}
/>

Imgur

Circle strokeWidth 🤗

With strokeWidth param you can customize the path circle strokeWidth.

<Progress
  type="circle"
  strokeWidth={3}
  percent={70}
/>
<Progress
  type="circle"
  percent={30}
/>

Imgur

API

Progress

PropertyDescriptionTypeDefault
percentset the completion percentagenumber0
statusset the status of the progress, options: success, error, activestring-
themeset the custom styles of the progress, options: [status]: { color: [string], symbol: '[any]'}object-
styleset the custom style of the react progress barobject-
typeset the type of the progress bar, options: circlestring-
widthset sizes of progress bar type circlenumber132
strokeWidthset strokeWidth of progress bar type circlenumber6
classNameset the custom class of the react progress barobject-
symbolClassNameset the symbol custom classobject-

Supported Browsers

React Sweet Porgress designed to support the latest web browsers. We support the current versions of Chrome, Firefox, Safari, Microsoft Edge and Internet Explorer 11. Also support the latest mobile browsers.

How to run example locally ?

  1. git clone https://github.com/abraztsov/react-sweet-progress.git
  2. cd react-sweet-progress
  3. npm start
  4. Go to localhost:8080

Feature Requests / Find Bug ?

Have an idea for a package or a feature you'd love to see in ReactSimpleFlexGrid? Search for existing GitHub issues and join the conversation or create new!

FAQ

This component based on ant design progress. Huge thanks them for a such an awesome work.

Future Plans

  • Create Circle progress
  • Add flexibility to custom styles

Updates

1.1.0 Added Circle progress

1.0.0 First release

FAQs

Package last updated on 22 Apr 2017

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