Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/gikey/react-ins-progress-bar

An instagram style progress bar
https://github.com/gikey/react-ins-progress-bar

instagram progress-bar react

Last synced: 4 days ago
JSON representation

An instagram style progress bar

Awesome Lists containing this project

README

        

# react-ins-progress-bar

English | [简体中文](./docs/zh-CN.md)

An instagram style progress bar

![](https://img.shields.io/npm/v/react-ins-progress-bar?style=flat-square)
![](https://img.shields.io/npm/dm/react-ins-progress-bar?style=flat-square)

## Demo

[Live Demo](https://gikey.github.io/react-ins-progress-bar/)

## Installation

```bash
npm install react-ins-progress-bar --save
```

## How to use

To include this project you need to require the module by using CommonJS syntax or ES6 Modules Syntax (recommended).

```javascript
import { InsProgressBar, insProgress } from 'react-ins-progress-bar';
```

render the InsProgressBar component in the higher DOM node possible, such as:

```javascript
render() {
return (




)
}
```

Then just call `insProgress.start()` and `insProgress.finish()`

```javascript
insProgress.start() // show progress bar
insProgress.finish() // hide progress bar
```

### Options

The component can receive some properties

#### Supported properties:

* `height` progress bar height (optional, default 5px)
* `delay` progress bar fadeOut time (optional, default 300ms)
* `position` progress bar position (optional, top or bottom)
* `duration` animation duration (optional, default 3000ms)
* `colors` gradient colors (optional)

##### example

```javascript

```

The `insProgress.start()` supported properties are the same as `` except `delay` property , `insProgress.finish()` support `delay` properties.

##### example

```javascript
insProgress.start({
'height': '10px',
'position': 'bottom',
'duration': 3000,
})
insProgress.finish({
'delay': 100
})
```